| 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 de7f61dc82dc837a95df95d90a248cf7015b841a..8de338c67815a7049dc0bcfcfc8b8aaed8d01f8a 100644
|
| --- a/chrome/browser/sync/glue/sync_backend_host.cc
|
| +++ b/chrome/browser/sync/glue/sync_backend_host.cc
|
| @@ -109,7 +109,8 @@ class SyncBackendHost::Core
|
| const sync_pb::EncryptedData& pending_keys) OVERRIDE;
|
| virtual void OnPassphraseAccepted() OVERRIDE;
|
| virtual void OnBootstrapTokenUpdated(
|
| - const std::string& bootstrap_token) OVERRIDE;
|
| + const std::string& bootstrap_token,
|
| + syncer::BootstrapTokenType type) OVERRIDE;
|
| virtual void OnEncryptedTypesChanged(
|
| syncer::ModelTypeSet encrypted_types,
|
| bool encrypt_everything) OVERRIDE;
|
| @@ -896,23 +897,6 @@ void SyncBackendHost::Core::OnSyncCycleCompleted(
|
| return;
|
| DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
|
|
| - if (snapshot.model_neutral_state().last_get_key_result ==
|
| - syncer::SYNCER_OK) {
|
| - // If we just received a new keystore key, get it and make sure we update
|
| - // the bootstrap token with it.
|
| - std::string keystore_token;
|
| - sync_manager_->GetKeystoreKeyBootstrapToken(&keystore_token);
|
| - if (!keystore_token.empty()) {
|
| - DVLOG(1) << "Persisting keystore encryption bootstrap token.";
|
| - host_.Call(FROM_HERE,
|
| - &SyncBackendHost::PersistEncryptionBootstrapToken,
|
| - keystore_token,
|
| - KEYSTORE_BOOTSTRAP_TOKEN);
|
| - } else {
|
| - NOTREACHED();
|
| - }
|
| - }
|
| -
|
| host_.Call(
|
| FROM_HERE,
|
| &SyncBackendHost::HandleSyncCycleCompletedOnFrontendLoop,
|
| @@ -973,14 +957,15 @@ void SyncBackendHost::Core::OnPassphraseAccepted() {
|
| }
|
|
|
| void SyncBackendHost::Core::OnBootstrapTokenUpdated(
|
| - const std::string& bootstrap_token) {
|
| + const std::string& bootstrap_token,
|
| + syncer::BootstrapTokenType type) {
|
| if (!sync_loop_)
|
| return;
|
| DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| host_.Call(FROM_HERE,
|
| &SyncBackendHost::PersistEncryptionBootstrapToken,
|
| bootstrap_token,
|
| - PASSPHRASE_BOOTSTRAP_TOKEN);
|
| + type);
|
| }
|
|
|
| void SyncBackendHost::Core::OnStopSyncingPermanently() {
|
| @@ -1428,10 +1413,10 @@ void SyncBackendHost::RetryConfigurationOnFrontendLoop(
|
|
|
| void SyncBackendHost::PersistEncryptionBootstrapToken(
|
| const std::string& token,
|
| - BootstrapTokenType token_type) {
|
| + syncer::BootstrapTokenType token_type) {
|
| CHECK(sync_prefs_.get());
|
| DCHECK(!token.empty());
|
| - if (token_type == PASSPHRASE_BOOTSTRAP_TOKEN)
|
| + if (token_type == syncer::PASSPHRASE_BOOTSTRAP_TOKEN)
|
| sync_prefs_->SetEncryptionBootstrapToken(token);
|
| else
|
| sync_prefs_->SetKeystoreEncryptionBootstrapToken(token);
|
|
|