| Index: chrome/browser/sync/credential_cache_service_win.cc
|
| diff --git a/chrome/browser/sync/credential_cache_service_win.cc b/chrome/browser/sync/credential_cache_service_win.cc
|
| index 23ac826ef192f9de27889e13a01a48976e48de0f..50fbe955df509e3d74eb5607958a014aaadadabd 100644
|
| --- a/chrome/browser/sync/credential_cache_service_win.cc
|
| +++ b/chrome/browser/sync/credential_cache_service_win.cc
|
| @@ -94,24 +94,6 @@ void CredentialCacheService::Observe(
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| DCHECK(local_store_.get());
|
| switch (type) {
|
| - case chrome::NOTIFICATION_PREF_CHANGED: {
|
| - // One of the two sync encryption tokens has changed. Update its value in
|
| - // the local cache.
|
| - const std::string pref_name =
|
| - *(content::Details<const std::string>(details).ptr());
|
| - if (pref_name == prefs::kSyncEncryptionBootstrapToken) {
|
| - PackAndUpdateStringPref(pref_name,
|
| - sync_prefs_.GetEncryptionBootstrapToken());
|
| - } else if (pref_name == prefs::kSyncKeystoreEncryptionBootstrapToken) {
|
| - PackAndUpdateStringPref(
|
| - pref_name,
|
| - sync_prefs_.GetKeystoreEncryptionBootstrapToken());
|
| - } else {
|
| - NOTREACHED() "Invalid pref name " << pref_name << ".";
|
| - }
|
| - break;
|
| - }
|
| -
|
| case chrome::NOTIFICATION_GOOGLE_SIGNED_OUT: {
|
| // The user has signed out. Write blank values to the google username,
|
| // encryption tokens and token service credentials in the local cache.
|
| @@ -193,6 +175,22 @@ void CredentialCacheService::Observe(
|
| }
|
| }
|
|
|
| +void CredentialCacheService::OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) {
|
| + // One of the two sync encryption tokens has changed. Update its value in
|
| + // the local cache.
|
| + if (pref_name == prefs::kSyncEncryptionBootstrapToken) {
|
| + PackAndUpdateStringPref(pref_name,
|
| + sync_prefs_.GetEncryptionBootstrapToken());
|
| + } else if (pref_name == prefs::kSyncKeystoreEncryptionBootstrapToken) {
|
| + PackAndUpdateStringPref(
|
| + pref_name,
|
| + sync_prefs_.GetKeystoreEncryptionBootstrapToken());
|
| + } else {
|
| + NOTREACHED() "Invalid pref name " << pref_name << ".";
|
| + }
|
| +}
|
| +
|
| void CredentialCacheService::ReadCachedCredentialsFromAlternateProfile() {
|
| // If the local user has signed in and signed out, we do not consume cached
|
| // credentials from the alternate profile. There is nothing more to do, now or
|
|
|