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

Unified Diff: components/sync/driver/non_ui_data_type_controller_unittest.cc

Issue 2511703004: [Sync] Remove UIDataTypeController (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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_data_type_controller_unittest.cc
diff --git a/components/sync/driver/non_ui_data_type_controller_unittest.cc b/components/sync/driver/non_ui_data_type_controller_unittest.cc
index c2f70561d8b4573d3f8f28d80a3432669260abb6..f03f79affd7c891bfe7e6b50dbce4e3251985dcf 100644
--- a/components/sync/driver/non_ui_data_type_controller_unittest.cc
+++ b/components/sync/driver/non_ui_data_type_controller_unittest.cc
@@ -105,15 +105,17 @@ class NonUIDataTypeControllerFake : public NonUIDataTypeController {
NonUIDataTypeControllerMock* mock,
SharedChangeProcessor* change_processor,
scoped_refptr<base::SingleThreadTaskRunner> backend_task_runner)
- : NonUIDataTypeController(kType, base::Closure(), sync_client),
+ : NonUIDataTypeController(kType,
+ base::Closure(),
+ sync_client,
+ GROUP_DB,
+ nullptr),
blocked_(false),
mock_(mock),
change_processor_(change_processor),
backend_task_runner_(backend_task_runner) {}
~NonUIDataTypeControllerFake() override {}
- ModelSafeGroup model_safe_group() const override { return GROUP_DB; }
-
// Prevent tasks from being posted on the backend thread until
// UnblockBackendTasks() is called.
void BlockBackendTasks() { blocked_ = true; }
@@ -124,7 +126,7 @@ class NonUIDataTypeControllerFake : public NonUIDataTypeController {
blocked_ = false;
for (std::vector<PendingTask>::const_iterator it = pending_tasks_.begin();
it != pending_tasks_.end(); ++it) {
- PostTaskOnBackendThread(it->from_here, it->task);
+ PostTaskOnModelThread(it->from_here, it->task);
}
pending_tasks_.clear();
}
@@ -138,8 +140,8 @@ class NonUIDataTypeControllerFake : public NonUIDataTypeController {
}
protected:
- bool PostTaskOnBackendThread(const tracked_objects::Location& from_here,
- const base::Closure& task) override {
+ bool PostTaskOnModelThread(const tracked_objects::Location& from_here,
+ const base::Closure& task) override {
if (blocked_) {
pending_tasks_.push_back(PendingTask(from_here, task));
return true;
« no previous file with comments | « components/sync/driver/non_ui_data_type_controller_mock.h ('k') | components/sync/driver/shared_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698