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

Unified Diff: sync/engine/all_status.cc

Issue 10991005: Added nudge source counters to about:sync. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
Index: sync/engine/all_status.cc
diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc
index 656d6e0b861b2b922f1eef66f514762afe1af69c..579bbb9c2dd4e9021b1b0865a323a33b8d835e22 100644
--- a/sync/engine/all_status.cc
+++ b/sync/engine/all_status.cc
@@ -174,6 +174,27 @@ void AllStatus::SetUniqueId(const std::string& guid) {
status_.unique_id = guid;
}
+void AllStatus::IncrementNudgeCounter(NudgeSource source) {
+ ScopedStatusLock lock(this);
+ switch(source) {
+ case NUDGE_SOURCE_LOCAL_REFRESH:
+ status_.nudge_source_local_refresh++;
+ break;
+ case NUDGE_SOURCE_LOCAL:
+ status_.nudge_source_local++;
+ break;
+ case NUDGE_SOURCE_NOTIFICATION:
+ status_.nudge_source_notification++;
+ break;
+ case NUDGE_SOURCE_CONTINUATION:
+ status_.nudge_source_continuation++;
+ break;
+ case NUDGE_SOURCE_UNKNOWN:
rlarocque 2012/09/24 23:24:37 This shouldn't happen. I think you could NOTREACH
+ default:
+ status_.nudge_source_unknown++;
+ }
+}
+
ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
: allstatus_(allstatus) {
allstatus->mutex_.Acquire();

Powered by Google App Engine
This is Rietveld 408576698