Description[sync] Automatic bootstrapping of Sync on Win 8 from cached credentials
Windows 8 has both a classic "Desktop" mode and a new "Metro" mode, that
must use different browser processes because Chrome profile data stores
can only be accessed from one profile at a time, and it is not
technically feasible to allow multi process access today.
The short term solution to making the experience less jarring on Windows
8 is to cache the sync credentials in a separate file when the user
signs in on either Metro or Desktop, so that they can be used to
auto-start sync on the alternate profile (Desktop or Metro) when it is
opened.
This patch contains the following changes:
- A new class CredentialCacheService, that contains code capable of
encrypting and persisting the google username, the lsid and sid,
the encryption bootstrap token, and a list of enabled / disabled sync
datatypes to a json encoded "Sync Credentials" file in the profile
directory.
- Methods that listen to the PrefService and TokenService for changes
to the above credentials and persist them when the user successfully
signs in manually.
- Code in ProfileSyncService that detects that we are running on Windows
8, and if sync has never been set up, tries to load cached credentials
from the alternate Metro / Desktop profile, and if they were found,
bootstrap sync using the credentials.
- Mechanisms to detect that we are using the "Default" profile on Metro
or Desktop. As of today, Metro Chrome on Windows 8 does not support
multiple profiles, and there is no good way to pair up a non-default
profile directory ("Profile 1", "Profile 2", etc.) on Desktop to its
corresponding directory on Metro and vice versa.
- Unit tests for functionality in credential_cache_service_win.{h|cc}.
BUG=139199, 139200
TEST=Sign in to sync on Desktop, launch Metro, and watch sync automatically start up
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148624
Patch Set 1 : "" #
Total comments: 53
Patch Set 2 : Major redesign with service / factory + notifications. #Patch Set 3 : Fix unit tests #
Total comments: 30
Patch Set 4 : CR Feedback #
Total comments: 2
Patch Set 5 : Fix TokenServiceTests #
Total comments: 18
Patch Set 6 : More CR Feedback #
Total comments: 2
Patch Set 7 : Fix nits #
Total comments: 4
Patch Set 8 : Fully decouple PSS and CCS. #
Total comments: 6
Patch Set 9 : Auto-initialize CCSFactory with Profile. #
Total comments: 1
Patch Set 10 : Rebase #Messages
Total messages: 23 (0 generated)
|