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

Unified Diff: chrome/browser/sync/engine/syncer.cc

Issue 7477004: Simulate transient error and verify exponential backoff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 4 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 | « chrome/browser/sync/engine/syncer.h ('k') | chrome/browser/sync/engine/syncer_end_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer.cc
diff --git a/chrome/browser/sync/engine/syncer.cc b/chrome/browser/sync/engine/syncer.cc
index fae03fa1787d343373a5537f1a776b1352075129..0d5a6d8cfc22a70fcf3d9bafa6a3dcca66417da4 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/chrome/browser/sync/engine/syncer.cc
@@ -54,6 +54,15 @@ using sessions::StatusController;
using sessions::SyncSession;
using sessions::ConflictProgress;
+Syncer::ScopedSyncStartStopTracker::ScopedSyncStartStopTracker(
+ sessions::SyncSession* session) : session_(session) {
+ session_->status_controller()->SetSyncInProgressAndUpdateStartTime(true);
+}
+
+Syncer::ScopedSyncStartStopTracker::~ScopedSyncStartStopTracker() {
+ session_->status_controller()->SetSyncInProgressAndUpdateStartTime(false);
+}
+
Syncer::Syncer()
: early_exit_requested_(false),
pre_conflict_resolution_closure_(NULL) {
@@ -83,6 +92,8 @@ void Syncer::SyncShare(sessions::SyncSession* session,
ScopedSessionContextConflictResolver scoped(session->context(),
&resolver_);
+
+ ScopedSyncStartStopTracker start_stop_tracker(session);
SyncerStep current_step = first_step;
SyncerStep next_step = current_step;
@@ -168,8 +179,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
// These two steps are combined since they are executed within the same
// write transaction.
case BUILD_COMMIT_REQUEST: {
- session->status_controller()->set_syncing(true);
-
VLOG(1) << "Processing Commit Request";
ScopedDirLookup dir(session->context()->directory_manager(),
session->context()->account_name());
« no previous file with comments | « chrome/browser/sync/engine/syncer.h ('k') | chrome/browser/sync/engine/syncer_end_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698