diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 06:25:04 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 06:25:04 +0000 |
commit | 674112fbf399a598535a32ef4cfbf97a1377a7ac (patch) | |
tree | d0815096dd92cf8f7afc3e6dd01d47c203514852 /sync/internal_api/sync_manager_impl.h | |
parent | 4f4b047e6d00780b0bffb739d493304c5373bcf6 (diff) | |
download | chromium_src-674112fbf399a598535a32ef4cfbf97a1377a7ac.zip chromium_src-674112fbf399a598535a32ef4cfbf97a1377a7ac.tar.gz chromium_src-674112fbf399a598535a32ef4cfbf97a1377a7ac.tar.bz2 |
Separate local and remote sync invalidations
The old design used ChromeSyncNotificationsBridge to register for both
NOTIFICATION_SYNC_REFRESH_LOCAL and NOTIFICATION_SYNC_REFRESH_REMOTE.
The first of these is issued when some component decides that the syncer
ought to perform an unsolicited GetUpdates for some type, while the
second is an Android-specific mechanism for receiving remote
invalidations. In either case, the ChromeSyncNotificationsBridge would
forward the invalidations to the SyncManager through the
BridgedInvalidator as though they had come from any other invalidator.
In this new design, the local and remote invalidations sources are kept
distinct. The SyncBackendHost is now responsible for listening to and
forwarding NOTIFICATION_SYNC_REFRESH_LOCAL. Note that there is no
longer any type-specific filtering performed as we receive
notifications; it will be up to the SyncManager to ignore notifications
for disbaled types.
The successor to ChromeSyncNotificationsBridge,
AndroidInvalidatorBridge, is responsible only for forwarding
NOTIFICATION_SYNC_REFRESH_REMOTE notificaitons. It is passed to the
SyncManager only if OS_ANDROID is defined.
Since there is only one source of remote invalidations, the
BridgedInvalidator would seem to be no longer necessary. Unfortunately,
this is not the case. The BridgedInvalidator was useful in part because
it wrapped the UI-thread-owned ChromeSyncNotificationsBridge without
owning it, so the SyncManager's destruction would not affect it. This
wrapping functionality is still needed by the AndroidInvalidatorBridge.
The BridgedInvalidator has been modified to only wrap a single
AndroidInvalidatorBridge, and renamed to AndroidInvalidatorBridgeProxy.
BUG=124143
Review URL: https://chromiumcodereview.appspot.com/12022041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_manager_impl.h')
-rw-r--r-- | sync/internal_api/sync_manager_impl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index bbcf794..32cee99 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -180,6 +180,9 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl : const ObjectIdInvalidationMap& invalidation_map, IncomingInvalidationSource source) OVERRIDE; + // Handle explicit requests to fetch updates for the given types. + virtual void RefreshTypes(ModelTypeSet types) OVERRIDE; + // These OnYYYChanged() methods are only called by our NetworkChangeNotifier. // Called when IP address of primary interface changes. virtual void OnIPAddressChanged() OVERRIDE; |