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

Unified Diff: components/sync_driver/non_ui_model_type_controller.h

Issue 1717433002: [USS] Break NonBlockingDataTypeController into UI specific one and non-UI specific one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 10 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/non_ui_model_type_controller.h
diff --git a/components/sync_driver/non_ui_model_type_controller.h b/components/sync_driver/non_ui_model_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..1bb59971b20857a667f28f77dfcba5a20ed6b4f3
--- /dev/null
+++ b/components/sync_driver/non_ui_model_type_controller.h
@@ -0,0 +1,40 @@
+// Copyright 2016 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.
+
+#ifndef COMPONENTS_SYNC_DRIVER_NON_UI_MODEL_TYPE_CONTROLLER_H_
+#define COMPONENTS_SYNC_DRIVER_NON_UI_MODEL_TYPE_CONTROLLER_H_
+
+#include "components/sync_driver/non_blocking_data_type_controller.h"
+
+namespace sync_driver {
+class SyncClient;
+}
+
+namespace sync_driver_v2 {
+
+// Implementation for Unified Sync and Storage datatypes whose model thread is
+// not the UI thread.
+// Derived types must implement the following methods:
+// - RunOnModelThread
+class NonUIModelTypeController : public NonBlockingDataTypeController {
+ public:
+ NonUIModelTypeController(
+ const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
+ const base::Closure& error_callback,
+ syncer::ModelType model_type,
+ sync_driver::SyncClient* sync_client);
+
+ void RunOnUIThread(const tracked_objects::Location& from_here,
+ const base::Closure& task) override;
+
+ protected:
+ ~NonUIModelTypeController() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NonUIModelTypeController);
+};
+
+} // namespace sync_driver_v2
+
+#endif // COMPONENTS_SYNC_DRIVER_NON_UI_MODEL_TYPE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698