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

Unified Diff: chrome/browser/sync/profile_sync_service.h

Issue 12288010: sync: preliminary support for deferred SyncBackendHost initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 8eb22b6a93da1fc151c36344185dae6bca5d57be..8a4997c34752cc6df3f8fccf99cdbe90dd0ac3d1 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -382,6 +382,9 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Returns a user-friendly string form of last synced time (in minutes).
virtual string16 GetLastSyncedTimeString() const;
+ // Returns a human readable string describing backend initialization state.
+ std::string GetBackendInitializationStateString() const;
+
// Returns true if startup is suppressed (i.e. user has stopped syncing via
// the google dashboard).
virtual bool IsStartSuppressed() const;
@@ -617,8 +620,6 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// Helper to install and configure a data type manager.
void ConfigureDataTypeManager();
- // Starts up the backend sync components.
- virtual void StartUp();
// Shuts down the backend sync components.
// |sync_disabled| indicates if syncing is being disabled or not.
void ShutdownImpl(bool sync_disabled);
@@ -718,6 +719,17 @@ class ProfileSyncService : public ProfileSyncServiceBase,
void ClearUnrecoverableError();
+ enum StartUpDeferredOption {
+ STARTUP_BACKEND_DEFERRED,
+ STARTUP_IMMEDIATE
+ };
+ void StartUp(StartUpDeferredOption deferred_option);
+
+ // Starts up the backend sync components. |deferred_option| specifies whether
+ // this is being called as part of an immediate startup or startup was
+ // originally deferred and we're finally getting around to finishing.
+ void StartUpSlowBackendComponents(StartUpDeferredOption deferred_option);
+
// About-flags experiment names for datatypes that aren't enabled by default
// yet.
static std::string GetExperimentNameForDataType(

Powered by Google App Engine
This is Rietveld 408576698