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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 10991005: Added nudge source counters to about:sync. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed indentation 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
« no previous file with comments | « sync/internal_api/public/engine/sync_status.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 20852f40ab391aa665dcae3a601239c71b314c88..8a53d788cb6b4fa842b512836988644659d7c0c3 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -979,6 +979,7 @@ void SyncManagerImpl::RequestNudgeForDataTypes(
base::TimeDelta nudge_delay = NudgeStrategy::GetNudgeDelayTimeDelta(
types.First().Get(),
this);
+ allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL);
scheduler_->ScheduleNudgeAsync(nudge_delay,
NUDGE_SOURCE_LOCAL,
types,
@@ -1273,11 +1274,13 @@ void SyncManagerImpl::OnIncomingInvalidation(
const ModelTypeStateMap& type_state_map =
ObjectIdStateMapToModelTypeStateMap(id_state_map);
if (source == LOCAL_INVALIDATION) {
+ allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_LOCAL_REFRESH);
scheduler_->ScheduleNudgeWithStatesAsync(
TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec),
NUDGE_SOURCE_LOCAL_REFRESH,
type_state_map, FROM_HERE);
} else if (!type_state_map.empty()) {
+ allstatus_.IncrementNudgeCounter(NUDGE_SOURCE_NOTIFICATION);
scheduler_->ScheduleNudgeWithStatesAsync(
TimeDelta::FromMilliseconds(kSyncSchedulerDelayMsec),
NUDGE_SOURCE_NOTIFICATION,
« no previous file with comments | « sync/internal_api/public/engine/sync_status.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698