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

Unified Diff: sync/engine/sync_engine_event_listener.h

Issue 152013003: Split up SyncEngineEventListener callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more forward declaration Created 6 years, 10 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
« no previous file with comments | « sync/engine/sync_engine_event.cc ('k') | sync/engine/sync_engine_event_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_engine_event_listener.h
diff --git a/sync/engine/sync_engine_event_listener.h b/sync/engine/sync_engine_event_listener.h
new file mode 100644
index 0000000000000000000000000000000000000000..2adffeb01a70f632f96aebbfaf7fa20099644710
--- /dev/null
+++ b/sync/engine/sync_engine_event_listener.h
@@ -0,0 +1,42 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
+#define SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
+
+#include "base/time/time.h"
+#include "sync/base/sync_export.h"
+#include "sync/internal_api/public/base/model_type.h"
+
+namespace syncer {
+
+struct SyncProtocolError;
+struct SyncCycleEvent;
+
+class SYNC_EXPORT_PRIVATE SyncEngineEventListener {
+ public:
+ SyncEngineEventListener();
+
+ // Generated at various points during the sync cycle.
+ virtual void OnSyncCycleEvent(const SyncCycleEvent& event) = 0;
+
+ // This event is sent when we receive an actionable error. It is up to
+ // the listeners to figure out the action to take using the error sent.
+ virtual void OnActionableError(const SyncProtocolError& error) = 0;
+
+ // This event is sent when scheduler decides to wait before next request
+ // either because it gets throttled by server or because it backs off after
+ // request failure. Retry time is passed in retry_time field of event.
+ virtual void OnRetryTimeChanged(base::Time retry_time) = 0;
+
+ // This event is sent when types are throttled or unthrottled.
+ virtual void OnThrottledTypesChanged(ModelTypeSet throttled_types) = 0;
+
+ protected:
+ virtual ~SyncEngineEventListener();
+};
+
+} // namespace syncer
+
+#endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_LISTENER_H_
« no previous file with comments | « sync/engine/sync_engine_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