Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Unified Diff: content/browser/background_sync/background_sync_service_impl.cc

Issue 2954433002: BackgroundSync: Convert to base::BindOnce/OnceCallback/OnceClosure (Closed)
Patch Set: rename local variable Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/background_sync/background_sync_service_impl.cc
diff --git a/content/browser/background_sync/background_sync_service_impl.cc b/content/browser/background_sync/background_sync_service_impl.cc
index 5abf720c7dbbee274d7f3c4db386e519649ab80c..7af8177d167138483a067dce65d1c4843c5ee6b0 100644
--- a/content/browser/background_sync/background_sync_service_impl.cc
+++ b/content/browser/background_sync/background_sync_service_impl.cc
@@ -83,9 +83,9 @@ BackgroundSyncServiceImpl::BackgroundSyncServiceImpl(
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(background_sync_context);
- binding_.set_connection_error_handler(
- base::Bind(&BackgroundSyncServiceImpl::OnConnectionError,
- base::Unretained(this) /* the channel is owned by this */));
+ binding_.set_connection_error_handler(base::BindOnce(
+ &BackgroundSyncServiceImpl::OnConnectionError,
+ base::Unretained(this) /* the channel is owned by this */));
}
void BackgroundSyncServiceImpl::OnConnectionError() {
@@ -107,8 +107,8 @@ void BackgroundSyncServiceImpl::Register(
DCHECK(background_sync_manager);
background_sync_manager->Register(
sw_registration_id, manager_options,
- base::Bind(&BackgroundSyncServiceImpl::OnRegisterResult,
- weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
+ base::BindOnce(&BackgroundSyncServiceImpl::OnRegisterResult,
+ weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
}
void BackgroundSyncServiceImpl::GetRegistrations(
@@ -120,8 +120,8 @@ void BackgroundSyncServiceImpl::GetRegistrations(
DCHECK(background_sync_manager);
background_sync_manager->GetRegistrations(
sw_registration_id,
- base::Bind(&BackgroundSyncServiceImpl::OnGetRegistrationsResult,
- weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
+ base::BindOnce(&BackgroundSyncServiceImpl::OnGetRegistrationsResult,
+ weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
}
void BackgroundSyncServiceImpl::OnRegisterResult(

Powered by Google App Engine
This is Rietveld 408576698