summaryrefslogtreecommitdiffstats
path: root/components/sync_driver
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 14:25:29 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 14:25:29 +0000
commit4ae718e2916c224ba4acb8da9b4bc317ad4b018e (patch)
tree8d182cef38394aab1059b02e6014b4a9bcc45c12 /components/sync_driver
parent3d0febf895ce3a17c40feea34516134f32890c5b (diff)
downloadchromium_src-4ae718e2916c224ba4acb8da9b4bc317ad4b018e.zip
chromium_src-4ae718e2916c224ba4acb8da9b4bc317ad4b018e.tar.gz
chromium_src-4ae718e2916c224ba4acb8da9b4bc317ad4b018e.tar.bz2
sync: Plumb per-type counter observers to UI
Implements the plumbing to get events from the DirectoryTypeDebugInfoEmitters in the ModelTypeRegistry, through the SyncManager, SyncBackendHostCore, and SyncBackendHost to the ProfileSyncService. At the moment, there are no observers register and no events are emitted. Future patches will include logic to update the counters and to expose their values on the about:sync page. BUG=328606 Review URL: https://codereview.chromium.org/269543020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/sync_driver')
-rw-r--r--components/sync_driver/sync_frontend.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/components/sync_driver/sync_frontend.h b/components/sync_driver/sync_frontend.h
index 47d76be..0a360a8 100644
--- a/components/sync_driver/sync_frontend.h
+++ b/components/sync_driver/sync_frontend.h
@@ -16,6 +16,9 @@ namespace syncer {
class DataTypeDebugInfoListener;
class JsBackend;
class ProtocolEvent;
+struct CommitCounters;
+struct StatusCounters;
+struct UpdateCounters;
} // namespace syncer
namespace sync_pb {
@@ -62,6 +65,30 @@ class SyncFrontend {
// is listening for it.
virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) = 0;
+ // Called when we receive an updated commit counter for a directory type.
+ //
+ // Disabled by default. Enable by calling
+ // EnableDirectoryTypeDebugInfoForwarding() on the backend.
+ virtual void OnDirectoryTypeCommitCounterUpdated(
+ syncer::ModelType type,
+ const syncer::CommitCounters& counters) = 0;
+
+ // Called when we receive an updated update counter for a directory type.
+ //
+ // Disabled by default. Enable by calling
+ // EnableDirectoryTypeDebugInfoForwarding() on the backend.
+ virtual void OnDirectoryTypeUpdateCounterUpdated(
+ syncer::ModelType type,
+ const syncer::UpdateCounters& counters) = 0;
+
+ // Called when we receive an updated status counter for a directory type.
+ //
+ // Disabled by default. Enable by calling
+ // EnableDirectoryTypeDebugInfoForwarding() on the backend.
+ virtual void OnDirectoryTypeStatusCounterUpdated(
+ syncer::ModelType type,
+ const syncer::StatusCounters& counters) = 0;
+
// The status of the connection to the sync server has changed.
virtual void OnConnectionStatusChange(
syncer::ConnectionStatus status) = 0;