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 7281017: [Sync] Add RequestCleanupDisabledTypes() method to SyncManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix migration integration tests 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
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..c20f671cf48a8c155f11894ad4045f7d127ac2eb 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/chrome/browser/sync/engine/syncer.cc
@@ -71,13 +71,26 @@ void Syncer::RequestEarlyExit() {
early_exit_requested_ = true;
}
+void Syncer::CleanupDisabledTypes(sessions::SyncSession* session) {
+ {
+ ScopedDirLookup dir(session->context()->directory_manager(),
+ session->context()->account_name());
+ // The directory must be good here.
+ CHECK(dir.good());
+ }
+ CleanupDisabledTypesCommand cleanup;
+ cleanup.Execute(session);
+}
+
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());
+ {
+ ScopedDirLookup dir(session->context()->directory_manager(),
+ session->context()->account_name());
+ // The directory must be good here.
+ CHECK(dir.good());
+ }
ScopedSessionContextConflictResolver scoped(session->context(),
&resolver_);
@@ -103,8 +116,7 @@ void Syncer::SyncShare(sessions::SyncSession* session,
break;
case CLEANUP_DISABLED_TYPES: {
VLOG(1) << "Cleaning up disabled types";
- CleanupDisabledTypesCommand cleanup;
- cleanup.Execute(session);
+ CleanupDisabledTypes(session);
next_step = DOWNLOAD_UPDATES;
break;
}

Powered by Google App Engine
This is Rietveld 408576698