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

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

Issue 10916036: [Sync] Implement keystore migration support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 3 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 579a40cb8f5028fe40f7d592e16fa7ef2861ceaa..d3352c7e25ab826457964c61e72c41a034f8695b 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -117,7 +117,7 @@ class SyncBackendHost::Core
virtual void OnEncryptionComplete() OVERRIDE;
virtual void OnCryptographerStateChanged(
syncer::Cryptographer* cryptographer) OVERRIDE;
- virtual void OnPassphraseStateChanged(syncer::PassphraseState state) OVERRIDE;
+ virtual void OnPassphraseTypeChanged(syncer::PassphraseType type) OVERRIDE;
// syncer::InvalidationHandler implementation.
virtual void OnNotificationsEnabled() OVERRIDE;
@@ -329,7 +329,7 @@ SyncBackendHost::SyncBackendHost(
content::GetUserAgent(GURL()),
invalidator_storage),
frontend_(NULL),
- cached_passphrase_state_(syncer::IMPLICIT_PASSPHRASE) {
+ cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {
}
SyncBackendHost::SyncBackendHost(Profile* profile)
@@ -345,7 +345,7 @@ SyncBackendHost::SyncBackendHost(Profile* profile)
content::GetUserAgent(GURL()),
base::WeakPtr<syncer::InvalidationStateTracker>()),
frontend_(NULL),
- cached_passphrase_state_(syncer::IMPLICIT_PASSPHRASE) {
+ cached_passphrase_type_(syncer::IMPLICIT_PASSPHRASE) {
}
SyncBackendHost::~SyncBackendHost() {
@@ -770,8 +770,8 @@ bool SyncBackendHost::IsUsingExplicitPassphrase() {
// TODO(zea): expose whether the custom passphrase is a frozen implicit
// passphrase or not to provide better messaging.
return IsNigoriEnabled() && (
- cached_passphrase_state_ == syncer::CUSTOM_PASSPHRASE ||
- cached_passphrase_state_ == syncer::FROZEN_IMPLICIT_PASSPHRASE);
+ cached_passphrase_type_ == syncer::CUSTOM_PASSPHRASE ||
+ cached_passphrase_type_ == syncer::FROZEN_IMPLICIT_PASSPHRASE);
}
bool SyncBackendHost::IsCryptographerReady(
@@ -1019,12 +1019,12 @@ void SyncBackendHost::Core::OnCryptographerStateChanged(
// Do nothing.
}
-void SyncBackendHost::Core::OnPassphraseStateChanged(
- syncer::PassphraseState state) {
+void SyncBackendHost::Core::OnPassphraseTypeChanged(
+ syncer::PassphraseType type) {
host_.Call(
FROM_HERE,
- &SyncBackendHost::HandlePassphraseStateChangedOnFrontendLoop,
- state);
+ &SyncBackendHost::HandlePassphraseTypeChangedOnFrontendLoop,
+ type);
}
void SyncBackendHost::Core::OnActionableError(
@@ -1520,12 +1520,12 @@ void SyncBackendHost::NotifyEncryptionComplete() {
frontend_->OnEncryptionComplete();
}
-void SyncBackendHost::HandlePassphraseStateChangedOnFrontendLoop(
- syncer::PassphraseState state) {
+void SyncBackendHost::HandlePassphraseTypeChangedOnFrontendLoop(
+ syncer::PassphraseType type) {
DCHECK_EQ(MessageLoop::current(), frontend_loop_);
- DVLOG(1) << "Passphrase state changed to "
- << syncer::PassphraseStateToString(state);
- cached_passphrase_state_ = state;
+ DVLOG(1) << "Passphrase type changed to "
+ << syncer::PassphraseTypeToString(type);
+ cached_passphrase_type_ = type;
}
void SyncBackendHost::HandleStopSyncingPermanentlyOnFrontendLoop() {

Powered by Google App Engine
This is Rietveld 408576698