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

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

Issue 7281017: [Sync] Add RequestCleanupDisabledTypes() method to SyncManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replaced with TODOs Created 9 years, 5 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/glue/data_type_manager_impl.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 abcf5f0664b1dedc83bfead39c318caaf7e5b679..fae03fa1787d343373a5537f1a776b1352075129 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/chrome/browser/sync/engine/syncer.cc
@@ -72,12 +72,14 @@ void Syncer::RequestEarlyExit() {
}
void Syncer::SyncShare(sessions::SyncSession* session,
- const SyncerStep first_step,
- const SyncerStep last_step) {
- ScopedDirLookup dir(session->context()->directory_manager(),
- session->context()->account_name());
- // The directory must be good here.
- CHECK(dir.good());
+ SyncerStep first_step,
+ SyncerStep last_step) {
+ {
+ ScopedDirLookup dir(session->context()->directory_manager(),
+ session->context()->account_name());
+ // The directory must be good here.
+ CHECK(dir.good());
+ }
ScopedSessionContextConflictResolver scoped(session->context(),
&resolver_);
@@ -153,7 +155,14 @@ void Syncer::SyncShare(sessions::SyncSession* session,
VLOG(1) << "Applying Updates";
ApplyUpdatesCommand apply_updates;
apply_updates.Execute(session);
- next_step = BUILD_COMMIT_REQUEST;
+ if (last_step == APPLY_UPDATES) {
+ // We're in configuration mode, but we still need to run the
+ // SYNCER_END step.
+ last_step = SYNCER_END;
+ next_step = SYNCER_END;
+ } else {
+ next_step = BUILD_COMMIT_REQUEST;
+ }
break;
}
// These two steps are combined since they are executed within the same
@@ -264,6 +273,10 @@ void Syncer::SyncShare(sessions::SyncSession* session,
break;
}
case SYNCER_END: {
+ VLOG(1) << "Syncer End";
+ SyncerEndCommand syncer_end_command;
+ syncer_end_command.Execute(session);
+ next_step = SYNCER_END;
break;
}
default:
@@ -277,15 +290,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
break;
current_step = next_step;
}
-
- VLOG(1) << "Syncer End";
- VLOG(2) << "last step: " << last_step << ", current step: "
- << current_step << ", next step: "
- << next_step << ", snapshot: "
- << session->TakeSnapshot().ToString();
- SyncerEndCommand syncer_end_command;
- syncer_end_command.Execute(session);
- return;
}
void Syncer::ProcessClientCommand(sessions::SyncSession* session) {
« no previous file with comments | « chrome/browser/sync/engine/syncer.h ('k') | chrome/browser/sync/glue/data_type_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698