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

Unified Diff: components/sync_driver/directory_data_type_controller.cc

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments Created 5 years, 3 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/directory_data_type_controller.cc
diff --git a/components/sync_driver/directory_data_type_controller.cc b/components/sync_driver/directory_data_type_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ce67b4f84fd0ab855bb84bab57a69f27a61a637f
--- /dev/null
+++ b/components/sync_driver/directory_data_type_controller.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_driver/directory_data_type_controller.h"
+
+#include "components/sync_driver/backend_data_type_configurer.h"
+
+namespace sync_driver {
+
+DirectoryDataTypeController::DirectoryDataTypeController(
+ const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
+ const base::Closure& error_callback)
+ : DataTypeController(ui_thread, error_callback) {}
+
+DirectoryDataTypeController::~DirectoryDataTypeController() {}
+
+void DirectoryDataTypeController::ActivateDataType(
+ BackendDataTypeConfigurer* configurer) {
+ // Tell the backend about the change processor for this type so it can
+ // begin routing changes to it.
+ configurer->ActivateDataType(type(), model_safe_group(),
+ GetChangeProcessor());
+}
+
+void DirectoryDataTypeController::DeactivateDataType(
+ BackendDataTypeConfigurer* configurer) {
+ configurer->DeactivateDataType(type());
+}
+
+} // namespace sync_driver
« no previous file with comments | « components/sync_driver/directory_data_type_controller.h ('k') | components/sync_driver/fake_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698