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

Side by Side Diff: sync/engine/sync_engine_event_listener.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « sync/engine/sync_cycle_event.cc ('k') | sync/engine/sync_engine_event_listener.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
6 #define SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
7
8 #include "base/time/time.h"
9 #include "sync/base/sync_export.h"
10 #include "sync/internal_api/public/base/model_type.h"
11
12 namespace syncer {
13
14 struct SyncProtocolError;
15 struct SyncCycleEvent;
16 class ProtocolEvent;
17
18 class SYNC_EXPORT SyncEngineEventListener {
19 public:
20 SyncEngineEventListener();
21
22 // Generated at various points during the sync cycle.
23 virtual void OnSyncCycleEvent(const SyncCycleEvent& event) = 0;
24
25 // This event is sent when we receive an actionable error. It is up to
26 // the listeners to figure out the action to take using the error sent.
27 virtual void OnActionableError(const SyncProtocolError& error) = 0;
28
29 // This event is sent when scheduler decides to wait before next request
30 // either because it gets throttled by server or because it backs off after
31 // request failure. Retry time is passed in retry_time field of event.
32 virtual void OnRetryTimeChanged(base::Time retry_time) = 0;
33
34 // This event is sent when types are throttled or unthrottled.
35 virtual void OnThrottledTypesChanged(ModelTypeSet throttled_types) = 0;
36
37 // This event is sent when the server requests a migration.
38 virtual void OnMigrationRequested(ModelTypeSet migration_types) = 0;
39
40 // Emits events when sync communicates with the server.
41 virtual void OnProtocolEvent(const ProtocolEvent& event) = 0;
42
43 protected:
44 virtual ~SyncEngineEventListener();
45 };
46
47 } // namespace syncer
48
49 #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_cycle_event.cc ('k') | sync/engine/sync_engine_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698