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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_impl.h

Issue 217183003: Add non-blocking sync code to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/glue/sync_backend_host_impl.h
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.h b/chrome/browser/sync/glue/sync_backend_host_impl.h
index 24e621513239c4b52efa5f5a1c714c482d949be6..5b5b1242f21c9e7e6142c01712714e766c14382f 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.h
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.h
@@ -100,6 +100,8 @@ class SyncBackendHostImpl
virtual void StopSyncingForShutdown() OVERRIDE;
virtual scoped_ptr<base::Thread> Shutdown(ShutdownOption option) OVERRIDE;
virtual void UnregisterInvalidationIds() OVERRIDE;
+ virtual void SetPreferredNonBlockingTypes(
+ syncer::ModelTypeSet types) OVERRIDE;
virtual void ConfigureDataTypes(
syncer::ConfigureReason reason,
const DataTypeConfigStateMap& config_state_map,
@@ -112,6 +114,7 @@ class SyncBackendHostImpl
ChangeProcessor* change_processor) OVERRIDE;
virtual void DeactivateDataType(syncer::ModelType type) OVERRIDE;
virtual syncer::UserShare* GetUserShare() const OVERRIDE;
+ virtual syncer::SyncCoreProxy GetSyncCoreProxy() OVERRIDE;
virtual Status GetDetailedStatus() OVERRIDE;
virtual syncer::sessions::SyncSessionSnapshot
GetLastSessionSnapshot() const OVERRIDE;
@@ -161,7 +164,8 @@ class SyncBackendHostImpl
virtual void HandleInitializationSuccessOnFrontendLoop(
const syncer::WeakHandle<syncer::JsBackend> js_backend,
const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>
- debug_info_listener);
+ debug_info_listener,
+ base::WeakPtr<syncer::SyncCore> sync_core);
// Downloading of control types failed and will be retried. Invokes the
// frontend's sync configure retry method.
@@ -257,6 +261,9 @@ class SyncBackendHostImpl
void HandleConnectionStatusChangeOnFrontendLoop(
syncer::ConnectionStatus status);
+ // Re-registers the appropriate set of ObjectIds with the invalidator.
+ void UpdateRegisteredInvalidationTypes();
+
// NotificationObserver implementation.
virtual void Observe(
int type,
@@ -286,6 +293,9 @@ class SyncBackendHostImpl
// sync loop.
scoped_refptr<SyncBackendHostCore> core_;
+ // A handle referencing the main interface for non-blocking sync types.
+ scoped_ptr<syncer::SyncCoreProxy> sync_core_proxy_;
+
bool initialized_;
const base::WeakPtr<sync_driver::SyncPrefs> sync_prefs_;
@@ -323,6 +333,12 @@ class SyncBackendHostImpl
invalidation::InvalidationService* invalidator_;
bool invalidation_handler_registered_;
+ // The set of enabled directory types, as of the last successful configure.
+ syncer::ModelTypeSet enabled_directory_types_;
+
+ // The set of preferred non-blocking types, as set by the frontend.
+ syncer::ModelTypeSet preferred_non_blocking_types_;
+
base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl);

Powered by Google App Engine
This is Rietveld 408576698