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

Unified Diff: components/sync/engine_impl/model_type_connector_proxy.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/engine_impl/model_type_connector_proxy.cc
diff --git a/components/sync/engine_impl/model_type_connector_proxy.cc b/components/sync/engine_impl/model_type_connector_proxy.cc
index c86311720bd04639cbd555c209e6b071c4e6cb02..86adea02d0ec475229e6fd54620e8f3b4c302601 100644
--- a/components/sync/engine_impl/model_type_connector_proxy.cc
+++ b/components/sync/engine_impl/model_type_connector_proxy.cc
@@ -18,19 +18,32 @@ ModelTypeConnectorProxy::ModelTypeConnectorProxy(
ModelTypeConnectorProxy::~ModelTypeConnectorProxy() {}
-void ModelTypeConnectorProxy::ConnectType(
+void ModelTypeConnectorProxy::ConnectNonBlockingType(
ModelType type,
std::unique_ptr<ActivationContext> activation_context) {
+ task_runner_->PostTask(FROM_HERE,
+ base::Bind(&ModelTypeConnector::ConnectNonBlockingType,
+ model_type_connector_, type,
+ base::Passed(&activation_context)));
+}
+
+void ModelTypeConnectorProxy::DisconnectNonBlockingType(ModelType type) {
task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&ModelTypeConnector::ConnectType, model_type_connector_, type,
- base::Passed(&activation_context)));
+ FROM_HERE, base::Bind(&ModelTypeConnector::DisconnectNonBlockingType,
+ model_type_connector_, type));
}
-void ModelTypeConnectorProxy::DisconnectType(ModelType type) {
+void ModelTypeConnectorProxy::RegisterDirectoryType(ModelType type,
+ ModelSafeGroup group) {
task_runner_->PostTask(FROM_HERE,
- base::Bind(&ModelTypeConnector::DisconnectType,
- model_type_connector_, type));
+ base::Bind(&ModelTypeConnector::RegisterDirectoryType,
+ model_type_connector_, type, group));
+}
+
+void ModelTypeConnectorProxy::UnregisterDirectoryType(ModelType type) {
+ task_runner_->PostTask(
+ FROM_HERE, base::Bind(&ModelTypeConnector::UnregisterDirectoryType,
+ model_type_connector_, type));
}
} // namespace syncer
« no previous file with comments | « components/sync/engine_impl/model_type_connector_proxy.h ('k') | components/sync/engine_impl/model_type_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698