Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / sync_backend_host_impl.cc
index 50f7df9..70a34cc 100644 (file)
@@ -12,9 +12,9 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/glue/sync_backend_host_core.h"
 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
-#include "chrome/browser/sync/glue/sync_frontend.h"
 #include "chrome/browser/sync/sync_prefs.h"
 #include "chrome/common/chrome_switches.h"
+#include "components/sync_driver/sync_frontend.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/notification_details.h"
 #include "content/public/browser/notification_source.h"
@@ -602,11 +602,6 @@ void SyncBackendHostImpl::HandleSyncCycleCompletedOnFrontendLoop(
 
   SDVLOG(1) << "Got snapshot " << snapshot.ToString();
 
-  const syncer::ModelTypeSet to_migrate =
-      snapshot.model_neutral_state().types_needing_local_migration;
-  if (!to_migrate.Empty())
-    frontend_->OnMigrationNeededForTypes(to_migrate);
-
   // Process any changes to the datatypes we're syncing.
   // TODO(sync): add support for removing types.
   if (initialized())
@@ -641,6 +636,14 @@ void SyncBackendHostImpl::HandleActionableErrorEventOnFrontendLoop(
   frontend_->OnActionableError(sync_error);
 }
 
+void SyncBackendHostImpl::HandleMigrationRequestedOnFrontendLoop(
+    syncer::ModelTypeSet types) {
+  if (!frontend_)
+    return;
+  DCHECK_EQ(base::MessageLoop::current(), frontend_loop_);
+  frontend_->OnMigrationNeededForTypes(types);
+}
+
 void SyncBackendHostImpl::OnInvalidatorStateChange(
     syncer::InvalidatorState state) {
   registrar_->sync_thread()->message_loop()->PostTask(
@@ -725,12 +728,6 @@ void SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop(
   cached_explicit_passphrase_time_ = explicit_passphrase_time;
 }
 
-void SyncBackendHostImpl::HandleStopSyncingPermanentlyOnFrontendLoop() {
-  if (!frontend_)
-    return;
-  frontend_->OnStopSyncingPermanently();
-}
-
 void SyncBackendHostImpl::HandleConnectionStatusChangeOnFrontendLoop(
     syncer::ConnectionStatus status) {
   if (!frontend_)