🚫Bind: components/sync/
Migrates some directories off of deprecated base::Bind, base::Callback,
etc, and onto the newer APIs.
Specifically this covers all of components/sync/ and the minimal set of
necessary updates to client code elsewhere in the tree.
Fixed: 1007739
Change-Id: I423028ab7b6f1b277b0a2e42a89a5a0ea09361c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975452
Commit-Queue: Ken Rockot <[email protected]>
Reviewed-by: Mikel Astiz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#726507}
diff --git a/components/sync/driver/sync_service.cc b/components/sync/driver/sync_service.cc
index eb8b71b6..d485703 100644
--- a/components/sync/driver/sync_service.cc
+++ b/components/sync/driver/sync_service.cc
@@ -4,17 +4,20 @@
#include "components/sync/driver/sync_service.h"
+#include <utility>
+
#include "components/signin/public/identity_manager/account_info.h"
#include "components/sync/driver/sync_user_settings.h"
#include "components/sync/engine/cycle/sync_cycle_snapshot.h"
namespace syncer {
-SyncSetupInProgressHandle::SyncSetupInProgressHandle(base::Closure on_destroy)
- : on_destroy_(on_destroy) {}
+SyncSetupInProgressHandle::SyncSetupInProgressHandle(
+ base::OnceClosure on_destroy)
+ : on_destroy_(std::move(on_destroy)) {}
SyncSetupInProgressHandle::~SyncSetupInProgressHandle() {
- on_destroy_.Run();
+ std::move(on_destroy_).Run();
}
CoreAccountId SyncService::GetAuthenticatedAccountId() const {