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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index d03947159f315f447647cdf24de34021f990c395..c3a8bffbce1e3771035894bfca89932216e31a6c 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -515,6 +515,9 @@ void SyncBackendHost::ActivateDataType(
// processors so it can receive updates.
DCHECK_EQ(processors_.count(type), 0U);
processors_[type] = change_processor;
+
+ // Start the change processor.
+ change_processor->Start(profile_, GetUserShare());
}
void SyncBackendHost::DeactivateDataType(
@@ -523,6 +526,8 @@ void SyncBackendHost::DeactivateDataType(
base::AutoLock lock(registrar_lock_);
registrar_.routing_info.erase(data_type_controller->type());
+ // Stop the change processor and remove it from the list of processors.
+ change_processor->Stop();
std::map<syncable::ModelType, ChangeProcessor*>::size_type erased =
processors_.erase(data_type_controller->type());
DCHECK_EQ(erased, 1U);
« no previous file with comments | « chrome/browser/sync/glue/session_data_type_controller.cc ('k') | chrome/browser/sync/glue/synchronized_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698