| Index: chrome/browser/sync/profile_sync_service.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
|
| index 27e3e56c5779796467e6867e98bb9a811fe4d154..c687fc537524bb3121cf6610feaa0249e969f09f 100644
|
| --- a/chrome/browser/sync/profile_sync_service.cc
|
| +++ b/chrome/browser/sync/profile_sync_service.cc
|
| @@ -1457,10 +1457,15 @@ void ProfileSyncService::Observe(int type,
|
| backend_->EnableEncryptEverything();
|
| NotifyObservers();
|
|
|
| - // In the old world, this would be a no-op. With new syncer thread,
|
| - // this is the point where it is safe to switch from config-mode to
|
| - // normal operation.
|
| - backend_->StartSyncingWithServer();
|
| + if (migrator_.get() &&
|
| + migrator_->state() != browser_sync::BackendMigrator::IDLE) {
|
| + // Migration in progress. Let the migrator know we just finished
|
| + // configuring something. It will be up to the migrator to call
|
| + // StartSyncingWithServer() if migration is now finished.
|
| + migrator_->OnConfigureDone(*result);
|
| + } else {
|
| + StartSyncingWithServer();
|
| + }
|
|
|
| break;
|
| }
|
| @@ -1543,6 +1548,11 @@ void ProfileSyncService::Observe(int type,
|
| }
|
| }
|
|
|
| +void ProfileSyncService::StartSyncingWithServer() {
|
| + if (backend_.get())
|
| + backend_->StartSyncingWithServer();
|
| +}
|
| +
|
| void ProfileSyncService::AddObserver(Observer* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
|
|