diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:14:35 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:14:35 +0000 |
commit | eb370fc0fba62ea44db5c35514fb3223523928cc (patch) | |
tree | 314febd8e19760c68cd7a20c1fd95bc5a26c1f97 /components/sync_driver/sync_frontend.h | |
parent | 560b54e7a49100618417e59a0f1589c864816b6a (diff) | |
download | chromium_src-eb370fc0fba62ea44db5c35514fb3223523928cc.zip chromium_src-eb370fc0fba62ea44db5c35514fb3223523928cc.tar.gz chromium_src-eb370fc0fba62ea44db5c35514fb3223523928cc.tar.bz2 |
sync: Expose ProtocolEvents on ProfileSyncService
Adds code to the sync engine to have it generate protocol events when it
contacts the server. These events are then sent through the
SyncSession, SyncManager, SyncBackendHostCore, SyncBackendHost, and
finally to the ProfileSyncService.
Objects on the UI thread can register with the ProfileSyncService as
observers of these events, though this CL does not introduce any of
these listeners.
BUG=349301
Review URL: https://codereview.chromium.org/203463005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/sync_driver/sync_frontend.h')
-rw-r--r-- | components/sync_driver/sync_frontend.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/sync_driver/sync_frontend.h b/components/sync_driver/sync_frontend.h index f7ed853..47d76be 100644 --- a/components/sync_driver/sync_frontend.h +++ b/components/sync_driver/sync_frontend.h @@ -15,6 +15,7 @@ namespace syncer { class DataTypeDebugInfoListener; class JsBackend; +class ProtocolEvent; } // namespace syncer namespace sync_pb { @@ -53,6 +54,14 @@ class SyncFrontend { // retried. virtual void OnSyncConfigureRetry() = 0; + // Informs the frontned of some network event. These notifications are + // disabled by default and must be enabled through an explicit request to the + // SyncBackendHost. + // + // It's disabld by default to avoid copying data across threads when no one + // is listening for it. + virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) = 0; + // The status of the connection to the sync server has changed. virtual void OnConnectionStatusChange( syncer::ConnectionStatus status) = 0; |