summaryrefslogtreecommitdiffstats
path: root/chrome/installer/gcapi_mac/gcapi.mm
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-13 22:00:13 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-13 22:00:13 +0000
commit88dde5aedfe775435c6a4f11a7ca2555f86cfe16 (patch)
tree8c4437828334dc52bb49d89a4510a31adb4baddb /chrome/installer/gcapi_mac/gcapi.mm
parent6145d405223b95d9c2054581e95b66979fe6f15a (diff)
downloadchromium_src-88dde5aedfe775435c6a4f11a7ca2555f86cfe16.zip
chromium_src-88dde5aedfe775435c6a4f11a7ca2555f86cfe16.tar.gz
chromium_src-88dde5aedfe775435c6a4f11a7ca2555f86cfe16.tar.bz2
[sync] Auto-create credential cache for users who are already signed in and go on to upgrade Chrome
CredentialCacheService on Windows 8 writes to the local credential cache when a user actively signs in / reconfigures sync. Existing cached credentials are not updated when Chrome is merely restarted after the user is signed in. This causes a problem when a user is already signed in, and then upgrades (and restarts) chrome from a version that didn't originally support credential caching. In such cases, we never end up caching credentials, and therefore, the user will have to sign in separately to Metro and Desktop. This patch contains the following changes: 1) Adds logic to auto-heal already-signed-in users who upgrade from older versions, by writing existing credentials to the local cache if during restart, we notice that there is no local cache file, and the user is already signed in to sync. 2) Simplifies the logic around checking if an alternate credential cache file exists, and only then initializing |alternate_store_|. It turns out that JsonPrefStore returns a useful PrefReadError field, and there is no need for CCS to do funky stuff on the FILE thread. 3) Simplifies OnInitialzationCompleted, which was being used to observe two separate JsonPrefStores. Instead of having CCS be a PrefStore::Observer, we now use two helper classes -- LocalStoreObserver and AlternateStoreObserver to cleanly divide what is done when each pref store is initialized. 4) Updates prefs::kGoogleServicesUsername by listening to the notifications NOTIFICATION_GOOGLE_SIGNED_OUT and NOTIFICATION_GOOGLE_SIGNIN_SUCCESSFUL instead of directly listening to the pref change. 5) Fixes a stray instance where we were accessing the gaia username pref via SyncPrefs instead of via the SigninManager. BUG=141555 TEST=Sign in to chrome, exit the browser, and delete "Sync Credentials" from the default profile directory. Restart Chrome and make sure that the credential cache file is freshly written using existing sync credentials. Review URL: https://chromiumcodereview.appspot.com/10830239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/gcapi_mac/gcapi.mm')
0 files changed, 0 insertions, 0 deletions