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

Issue 10830362: Revert 151364 - [sync] Auto-create credential cache for users who are already signed in and go on t… (Closed)

Created:
8 years, 4 months ago by Nicolas Zea
Modified:
8 years, 4 months ago
Reviewers:
Raghu Simha
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing)
Visibility:
Public.

Description

Revert 151364 - [sync] Auto-create credential cache for users who are already signed in and go on to upgrade Chrome Reverted due to crashes in GetLastUpdatedTime(). See crbug.com/143214 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 TBR=rsimha@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151934

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -337 lines) Patch
M chrome/browser/signin/token_service.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/credential_cache_service_win.h View 7 chunks +25 lines, -66 lines 0 comments Download
M chrome/browser/sync/credential_cache_service_win.cc View 12 chunks +208 lines, -267 lines 0 comments Download
M chrome/browser/sync/credential_cache_service_win_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Nicolas Zea
8 years, 4 months ago (2012-08-16 19:05:40 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698