summaryrefslogtreecommitdiffstats
path: root/sync/internal_api
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 18:54:41 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 18:54:41 +0000
commit942687d2202349391d90730956df4b084c9eeb58 (patch)
tree9180fd632fe522287bf6e54f4f607060f895a2ce /sync/internal_api
parent7e54174986fee6509bee8bbd366678fabeb5a38c (diff)
downloadchromium_src-942687d2202349391d90730956df4b084c9eeb58.zip
chromium_src-942687d2202349391d90730956df4b084c9eeb58.tar.gz
chromium_src-942687d2202349391d90730956df4b084c9eeb58.tar.bz2
Add chrome://sync counter for total commits
This is a strictly increasing counter that tracks the total number of successful commits during the life of this sync instance. BUG=128409 TEST=Open chrome://sync, observe "Successful Commits" counter. Review URL: https://chromiumcodereview.appspot.com/10441117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api')
-rw-r--r--sync/internal_api/all_status.cc2
-rw-r--r--sync/internal_api/sync_manager.cc1
-rw-r--r--sync/internal_api/sync_manager.h4
3 files changed, 6 insertions, 1 deletions
diff --git a/sync/internal_api/all_status.cc b/sync/internal_api/all_status.cc
index 17c885d..194f26b 100644
--- a/sync/internal_api/all_status.cc
+++ b/sync/internal_api/all_status.cc
@@ -70,6 +70,8 @@ sync_api::SyncManager::Status AllStatus::CalcSyncing(
snapshot.syncer_status().num_tombstone_updates_downloaded_total;
status.reflected_updates_received +=
snapshot.syncer_status().num_reflected_updates_downloaded_total;
+ status.num_commits_total +=
+ snapshot.syncer_status().num_successful_commits;
status.num_local_overwrites_total +=
snapshot.syncer_status().num_local_overwrites;
status.num_server_overwrites_total +=
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index b25c8848..4a5ade2 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -716,6 +716,7 @@ SyncManager::Status::Status()
updates_received(0),
reflected_updates_received(0),
tombstone_updates_received(0),
+ num_commits_total(0),
num_local_overwrites_total(0),
num_server_overwrites_total(0),
nonempty_get_updates(0),
diff --git a/sync/internal_api/sync_manager.h b/sync/internal_api/sync_manager.h
index 6076ab7..73229ab 100644
--- a/sync/internal_api/sync_manager.h
+++ b/sync/internal_api/sync_manager.h
@@ -128,10 +128,12 @@ class SyncManager {
int updates_received;
// Total updates received that are echoes of our own changes.
int reflected_updates_received;
-
// Of updates_received, how many were tombstones.
int tombstone_updates_received;
+ // Total successful commits.
+ int num_commits_total;
+
// Total number of overwrites due to conflict resolver since browser start.
int num_local_overwrites_total;
int num_server_overwrites_total;