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

Unified Diff: components/sync_driver/non_ui_model_type_controller_unittest.cc

Issue 1763953002: [USS] Change the place where SharedModelTypeProcessor got created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sky's review Created 4 years, 9 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_unittest.cc
diff --git a/components/sync_driver/non_ui_model_type_controller_unittest.cc b/components/sync_driver/non_ui_model_type_controller_unittest.cc
index a309c36a04f34b4ad6f19ab6b1e1b3928be3c6d8..856ee98534da63a3b4c6e9ad1620c56bebce75b1 100644
--- a/components/sync_driver/non_ui_model_type_controller_unittest.cc
+++ b/components/sync_driver/non_ui_model_type_controller_unittest.cc
@@ -54,8 +54,6 @@ class TestNonUIModelTypeController : public NonUIModelTypeController {
return model_task_runner_->PostTask(from_here, task);
}
- void InitializeProcessorInTest() { InitializeProcessor(); }
-
private:
~TestNonUIModelTypeController() override {}
@@ -167,7 +165,6 @@ class NonUIModelTypeControllerTest : public testing::Test,
controller_ = new TestNonUIModelTypeController(
ui_loop_.task_runner(), model_thread_runner_, base::Closure(),
syncer::DICTIONARY, this);
- controller_->InitializeProcessorInTest();
InitializeTypeProcessor();
}
@@ -186,7 +183,9 @@ class NonUIModelTypeControllerTest : public testing::Test,
void InitializeTypeProcessor() {
if (!model_thread_runner_ ||
model_thread_runner_->BelongsToCurrentThread()) {
- type_processor_ = controller_->get_type_processor();
+ type_processor_ =
maxbogue 2016/03/24 23:28:47 This flow is super weird, but it's fine for now. C
Gang Wu 2016/03/25 02:07:00 Done.
+ service_->SetUpProcessor(new syncer_v2::SharedModelTypeProcessor(
+ syncer::DICTIONARY, service_.get()));
} else {
model_thread_runner_->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698