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

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

Issue 14018026: sync: SyncableService support for starting sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 61b570058ee6da2a75d59a13fccc36d52264d80d..5d3a4531f7aa8c883ed30bd8ed53931b1117f4b6 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -625,6 +625,12 @@ class ProfileSyncService : public ProfileSyncServiceBase,
const invalidation::ObjectId& id,
const std::string& payload);
+ // Called when a datatype (SyncableService) has a need for sync to start
+ // ASAP, presumably because a local change event has occurred but we're
+ // still in deferred start mode, meaning the SyncableService hasn't been
+ // told to MergeDataAndStartSyncing yet.
+ void OnDataTypeRequestsSyncStartup(syncer::ModelType type);
+
protected:
// Used by test classes that derive from ProfileSyncService.
virtual browser_sync::SyncBackendHost* GetBackendForTest();
@@ -742,10 +748,8 @@ class ProfileSyncService : public ProfileSyncServiceBase,
};
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);
+ // Starts up the backend sync components.
+ void StartUpSlowBackendComponents();
// About-flags experiment names for datatypes that aren't enabled by default
// yet.
@@ -825,6 +829,12 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// called.
base::Time start_up_time_;
+ // Whether we have received a signal from a SyncableService requesting that
+ // sync starts as soon as possible.
+ // TODO(tim): Move this and other TryStart related logic + state to separate
+ // class. Bug 80149.
+ bool data_type_requested_sync_startup_;
+
// The time that OnConfigureStart is called. This member is zero if
// OnConfigureStart has not yet been called, and is reset to zero once
// OnConfigureDone is called.

Powered by Google App Engine
This is Rietveld 408576698