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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2683203003: [sync] Call ConsumeCachedPassphraseIfPossible after SetSyncEngine (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 3eaafb86852dac7bf0108d3179ef693cbdb4bf24..10f4fa4d6b72a0732624f1e402722054aad99196 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -941,11 +941,6 @@ void ProfileSyncService::OnEngineInitialized(
engine_->EnableDirectoryTypeDebugInfoForwarding();
}
- // If we have a cached passphrase use it to decrypt/encrypt data now that the
- // backend is initialized. We want to call this before notifying observers in
- // case this operation affects the "passphrase required" status.
- crypto_->ConsumeCachedPassphraseIfPossible();
-
// The very first time the backend initializes is effectively the first time
// we can say we successfully "synced". LastSyncedTime will only be null in
// this case, because the pref wasn't restored on StartUp.
@@ -961,6 +956,11 @@ void ProfileSyncService::OnEngineInitialized(
crypto_->SetSyncEngine(engine_.get());
crypto_->SetDataTypeManager(data_type_manager_.get());
+ // If we have a cached passphrase use it to decrypt/encrypt data now that the
+ // backend is initialized. We want to call this before notifying observers in
+ // case this operation affects the "passphrase required" status.
+ crypto_->ConsumeCachedPassphraseIfPossible();
+
// Auto-start means IsFirstSetupComplete gets set automatically.
if (start_behavior_ == AUTO_START && !IsFirstSetupComplete()) {
// This will trigger a configure if it completes setup.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698