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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.cc

Issue 2641523004: [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Address comments Created 3 years, 11 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: components/sync/driver/glue/sync_backend_host_impl.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index ff1a70e7738c43e668f251314436bdb64cc29579..0106db4c35c75d85980b0eba0576772245170838 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -90,15 +90,17 @@ void SyncBackendHostImpl::UpdateCredentials(
credentials));
}
+void SyncBackendHostImpl::StartConfiguration() {
+ sync_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&SyncBackendHostCore::DoStartConfiguration, core_));
+}
+
void SyncBackendHostImpl::StartSyncingWithServer() {
SDVLOG(1) << "SyncBackendHostImpl::StartSyncingWithServer called.";
- ModelSafeRoutingInfo routing_info;
- registrar_->GetModelSafeRoutingInfo(&routing_info);
-
sync_task_runner_->PostTask(
FROM_HERE, base::Bind(&SyncBackendHostCore::DoStartSyncing, core_,
- routing_info, sync_prefs_->GetLastPollTime()));
+ sync_prefs_->GetLastPollTime()));
}
void SyncBackendHostImpl::SetEncryptionPassphrase(const std::string& passphrase,
@@ -211,6 +213,15 @@ void SyncBackendHostImpl::ConfigureDataTypes(ConfigureParams params) {
base::Passed(&params)));
}
+void SyncBackendHostImpl::RegisterDirectoryDataType(ModelType type,
+ ModelSafeGroup group) {
+ model_type_connector_->RegisterDirectoryType(type, group);
+}
+
+void SyncBackendHostImpl::UnregisterDirectoryDataType(ModelType type) {
+ model_type_connector_->UnregisterDirectoryType(type);
+}
+
void SyncBackendHostImpl::EnableEncryptEverything() {
sync_task_runner_->PostTask(
FROM_HERE,
@@ -234,11 +245,12 @@ void SyncBackendHostImpl::ActivateNonBlockingDataType(
registrar_->RegisterNonBlockingType(type);
if (activation_context->model_type_state.initial_sync_done())
registrar_->AddRestoredNonBlockingType(type);
- model_type_connector_->ConnectType(type, std::move(activation_context));
+ model_type_connector_->ConnectNonBlockingType(type,
+ std::move(activation_context));
}
void SyncBackendHostImpl::DeactivateNonBlockingDataType(ModelType type) {
- model_type_connector_->DisconnectType(type);
+ model_type_connector_->DisconnectNonBlockingType(type);
}
UserShare* SyncBackendHostImpl::GetUserShare() const {
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_impl.h ('k') | components/sync/driver/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698