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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 9956097: suppress user/password dialog when re-enabling sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve Drew's comments. Created 8 years, 9 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
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 65910cde3cbaf935f0875470bbe43957a8e7edd6..da59af7d5e8655f301df8b3b170de84165bb520c 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -354,6 +354,10 @@ void SyncBackendHost::Initialize(
profile_,
sync_thread_.message_loop()));
initialization_state_ = CREATING_SYNC_MANAGER;
+ std::string bootstrap_token = sync_prefs_->GetEncryptionBootstrapToken();
+ if (bootstrap_token.empty())
+ bootstrap_token = sync_prefs_->GetSpareBootstrapToken();
+
InitCore(DoInitializeOptions(
sync_thread_.message_loop(),
registrar_.get(),
@@ -366,7 +370,7 @@ void SyncBackendHost::Initialize(
&chrome_sync_notification_bridge_,
&sync_notifier_factory_,
delete_sync_data_folder,
- sync_prefs_->GetEncryptionBootstrapToken(),
+ bootstrap_token,
sync_api::SyncManager::NON_TEST,
unrecoverable_error_handler,
report_unrecoverable_error_function));
@@ -920,6 +924,7 @@ void SyncBackendHost::Core::OnPassphraseAccepted() {
void SyncBackendHost::Core::OnBootstrapTokenUpdated(
const std::string& bootstrap_token) {
+ LOG(WARNING) << "OnBootstrapTokenUpdated : " << bootstrap_token;
if (!sync_loop_)
return;
DCHECK_EQ(MessageLoop::current(), sync_loop_);

Powered by Google App Engine
This is Rietveld 408576698