Chromium Code Reviews| Index: chrome/browser/sync/profile_sync_service.h |
| diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h |
| index ef5eff0c9382fa1936b18ef0a068a38efb8e531f..48690578b79a8b6ab10cf77bfc69b930cb61931c 100644 |
| --- a/chrome/browser/sync/profile_sync_service.h |
| +++ b/chrome/browser/sync/profile_sync_service.h |
| @@ -56,6 +56,7 @@ namespace sessions { class SyncSessionSnapshot; } |
| namespace syncer { |
| class BaseTransaction; |
| +class CredentialCacheService; |
| struct SyncCredentials; |
| struct UserShare; |
| } |
| @@ -515,6 +516,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend, |
| const GURL& sync_service_url() const { return sync_service_url_; } |
| bool auto_start_enabled() const { return auto_start_enabled_; } |
| SigninManager* signin() const { return signin_; } |
| + base::WeakPtr<browser_sync::SyncPrefs> sync_prefs() { |
| + return sync_prefs_.AsWeakPtr(); |
|
Andrew T Wilson (Slow)
2012/07/20 01:04:05
In the past, people who need to access SyncPrefs h
Raghu Simha
2012/07/20 23:35:22
I was under the (false) impression that only one S
|
| + } |
| // Stops the sync backend and sets the flag for suppressing sync startup. |
| void StopAndSuppress(); |
| @@ -613,6 +617,17 @@ class ProfileSyncService : public browser_sync::SyncFrontend, |
| friend class TestProfileSyncService; |
| FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceTest, InitialState); |
| + // Returns true if we are running on Windows 8, the user is not signed in to |
| + // sync, sync is not disabled by policy, and startup is not suppressed. |
| + // Used to prevent the user from having to sign in twice with the same account |
| + // on Metro and Desktop Chrome. |
| + bool ShouldInitializeCredentialCacheService(); |
| + |
| + // Returns true if we are running on Windows 8, the credential cache service |
| + // is up and running, and credentials were successfully loaded from the |
| + // alternate profile. |
| + bool LoadedCachedCredentials(); |
| + |
| // Starts up sync if it is not suppressed and preconditions are met. |
| // Called from Initialize() and UnsuppressAndStart(). |
| void TryStart(); |
| @@ -816,6 +831,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend, |
| // Factory the backend will use to build the SyncManager. |
| syncer::SyncManagerFactory sync_manager_factory_; |
| + // Used to share sync credentials between Metro and Desktop on Windows 8. |
| + syncer::CredentialCacheService* credential_cache_service_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| }; |