| Index: sync/engine/all_status.cc
|
| diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc
|
| index 656d6e0b861b2b922f1eef66f514762afe1af69c..82457e466ee3fd07b0a96b4b307d4faf5412246d 100644
|
| --- a/sync/engine/all_status.cc
|
| +++ b/sync/engine/all_status.cc
|
| @@ -174,6 +174,29 @@ 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++;
|
| + return;
|
| + case NUDGE_SOURCE_LOCAL:
|
| + status_.nudge_source_local++;
|
| + return;
|
| + case NUDGE_SOURCE_NOTIFICATION:
|
| + status_.nudge_source_notification++;
|
| + return;
|
| + case NUDGE_SOURCE_CONTINUATION:
|
| + status_.nudge_source_continuation++;
|
| + return;
|
| + case NUDGE_SOURCE_UNKNOWN:
|
| + break;
|
| + }
|
| + // If we're here, the source is most likely
|
| + // NUDGE_SOURCE_UNKNOWN. That shouldn't happen.
|
| + NOTREACHED();
|
| +}
|
| +
|
| ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
|
| : allstatus_(allstatus) {
|
| allstatus->mutex_.Acquire();
|
|
|