From eb370fc0fba62ea44db5c35514fb3223523928cc Mon Sep 17 00:00:00 2001 From: "rlarocque@chromium.org" Date: Fri, 21 Mar 2014 22:14:35 +0000 Subject: 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 --- sync/engine/get_updates_delegate.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sync/engine/get_updates_delegate.h') diff --git a/sync/engine/get_updates_delegate.h b/sync/engine/get_updates_delegate.h index 9ebc6d8..d897edf 100644 --- a/sync/engine/get_updates_delegate.h +++ b/sync/engine/get_updates_delegate.h @@ -5,6 +5,7 @@ #ifndef SYNC_ENGINE_GET_UPDATES_DELEGATE_H_ #define SYNC_ENGINE_GET_UPDATES_DELEGATE_H_ +#include "sync/internal_api/public/events/protocol_event.h" #include "sync/protocol/sync.pb.h" #include "sync/sessions/model_type_registry.h" #include "sync/sessions/nudge_tracker.h" @@ -31,6 +32,10 @@ class SYNC_EXPORT_PRIVATE GetUpdatesDelegate { virtual void ApplyUpdates( sessions::StatusController* session, UpdateHandlerMap* update_handler_map) const = 0; + + virtual scoped_ptr GetNetworkRequestEvent( + base::Time timestamp, + const sync_pb::ClientToServerMessage& request) const = 0; }; // Functionality specific to the normal GetUpdate request. @@ -48,6 +53,9 @@ class SYNC_EXPORT_PRIVATE NormalGetUpdatesDelegate : public GetUpdatesDelegate { sessions::StatusController* status, UpdateHandlerMap* update_handler_map) const OVERRIDE; + virtual scoped_ptr GetNetworkRequestEvent( + base::Time timestamp, + const sync_pb::ClientToServerMessage& request) const OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesDelegate); @@ -74,6 +82,9 @@ class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesDelegate sessions::StatusController* status, UpdateHandlerMap* update_handler_map) const OVERRIDE; + virtual scoped_ptr GetNetworkRequestEvent( + base::Time timestamp, + const sync_pb::ClientToServerMessage& request) const OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(ConfigureGetUpdatesDelegate); @@ -98,6 +109,9 @@ class SYNC_EXPORT_PRIVATE PollGetUpdatesDelegate : public GetUpdatesDelegate { sessions::StatusController* status, UpdateHandlerMap* update_handler_map) const OVERRIDE; + virtual scoped_ptr GetNetworkRequestEvent( + base::Time timestamp, + const sync_pb::ClientToServerMessage& request) const OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesDelegate); }; -- cgit v1.1