summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/sync/profile_sync_service.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 012c516..4ca5215 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1393,17 +1393,20 @@ void ProfileSyncService::Observe(int type,
DCHECK(!(IsPassphraseRequiredForDecryption() &&
!IsEncryptedDatatypeEnabled()));
- // 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();
-
+ // This must be done before we start syncing with the server to avoid
+ // sending unencrypted data up on a first time sync.
if (!encryption_pending_) {
wizard_.Step(SyncSetupWizard::DONE);
NotifyObservers();
} else {
backend_->EnableEncryptEverything();
}
+
+ // 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();
+
break;
}
case chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED: {