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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 7511004: [Sync] Refactor data type configuration/activation/deactivation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, address comments 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
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 0578300a62be21c674d30c895243a3f1646ff35d..8df55c0f961251dbef4c84064222c02b1fc569f3 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -349,12 +349,12 @@ void ProfileSyncService::InitializeBackend(bool delete_sync_data_folder) {
return;
}
- syncable::ModelTypeSet types;
+ syncable::ModelTypeSet initial_types;
// If sync setup hasn't finished, we don't want to initialize routing info
// for any data types so that we don't download updates for types that the
// user chooses not to sync on the first DownloadUpdatesCommand.
if (HasSyncSetupCompleted()) {
- GetPreferredDataTypes(&types);
+ GetPreferredDataTypes(&initial_types);
}
SyncCredentials credentials = GetCredentials();
@@ -366,7 +366,7 @@ void ProfileSyncService::InitializeBackend(bool delete_sync_data_folder) {
this,
WeakHandle<JsEventHandler>(sync_js_controller_.AsWeakPtr()),
sync_service_url_,
- types,
+ initial_types,
credentials,
delete_sync_data_folder);
}
@@ -1179,22 +1179,20 @@ void ProfileSyncService::GetModelSafeRoutingInfo(
}
void ProfileSyncService::ActivateDataType(
- DataTypeController* data_type_controller,
+ syncable::ModelType type, browser_sync::ModelSafeGroup group,
ChangeProcessor* change_processor) {
if (!backend_.get()) {
NOTREACHED();
return;
}
DCHECK(backend_initialized_);
- backend_->ActivateDataType(data_type_controller, change_processor);
+ backend_->ActivateDataType(type, group, change_processor);
}
-void ProfileSyncService::DeactivateDataType(
- DataTypeController* data_type_controller,
- ChangeProcessor* change_processor) {
+void ProfileSyncService::DeactivateDataType(syncable::ModelType type) {
if (!backend_.get())
return;
- backend_->DeactivateDataType(data_type_controller, change_processor);
+ backend_->DeactivateDataType(type);
}
void ProfileSyncService::SetPassphrase(const std::string& passphrase,

Powered by Google App Engine
This is Rietveld 408576698