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

Unified Diff: components/sync_driver/non_blocking_data_type_controller_unittest.cc

Issue 1486363002: USS: Introduce dependency of SharedModelTypeProcessor on ModelTypeService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 5 years 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
« no previous file with comments | « no previous file | sync/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/non_blocking_data_type_controller_unittest.cc
diff --git a/components/sync_driver/non_blocking_data_type_controller_unittest.cc b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
index 0c857fd242cf862b47ea73632bb6814fa41e84df..9d92f44303dd15c788cf511129d82da6fbfa6af1 100644
--- a/components/sync_driver/non_blocking_data_type_controller_unittest.cc
+++ b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
@@ -19,6 +19,7 @@
#include "sync/engine/commit_queue.h"
#include "sync/internal_api/public/activation_context.h"
#include "sync/internal_api/public/shared_model_type_processor.h"
+#include "sync/internal_api/public/test/fake_model_type_service.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace sync_driver_v2 {
@@ -187,9 +188,9 @@ class NonBlockingDataTypeControllerTest : public testing::Test,
protected:
void CreateTypeProcessor() {
- // TODO(pavely): stop passing ModelTypeStore.
- type_processor_.reset(new syncer_v2::SharedModelTypeProcessor(
- syncer::DICTIONARY, base::WeakPtr<syncer_v2::ModelTypeStore>()));
+ // TODO(stanisc): Controller should discover the service via SyncClient.
+ type_processor_.reset(
+ new syncer_v2::SharedModelTypeProcessor(syncer::DICTIONARY, &service_));
type_processor_for_ui_ = type_processor_->AsWeakPtrForUI();
}
@@ -330,6 +331,7 @@ class NonBlockingDataTypeControllerTest : public testing::Test,
scoped_refptr<base::TestSimpleTaskRunner> sync_thread_runner_;
MockSyncBackend backend_;
MockBackendDataTypeConfigurer configurer_;
+ syncer_v2::FakeModelTypeService service_;
};
TEST_F(NonBlockingDataTypeControllerTest, InitialState) {
« no previous file with comments | « no previous file | sync/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698