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

Unified Diff: sync/sessions/model_type_registry_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 | « sync/internal_api/test/fake_model_type_service.cc ('k') | sync/sync_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/model_type_registry_unittest.cc
diff --git a/sync/sessions/model_type_registry_unittest.cc b/sync/sessions/model_type_registry_unittest.cc
index 6db266aed487c11293a564c10984f8edfd4a3c00..30ffbff5fe59fa114f2bb3ca30d4eb1221644f35 100644
--- a/sync/sessions/model_type_registry_unittest.cc
+++ b/sync/sessions/model_type_registry_unittest.cc
@@ -9,6 +9,7 @@
#include "sync/internal_api/public/activation_context.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/shared_model_type_processor.h"
+#include "sync/internal_api/public/test/fake_model_type_service.h"
#include "sync/sessions/model_type_registry.h"
#include "sync/test/engine/fake_model_worker.h"
#include "sync/test/engine/mock_nudge_handler.h"
@@ -17,17 +18,8 @@
namespace syncer {
-namespace {
-
-scoped_ptr<syncer_v2::SharedModelTypeProcessor> MakeModelTypeProcessor(
- ModelType type) {
- return make_scoped_ptr(new syncer_v2::SharedModelTypeProcessor(
- type, base::WeakPtr<syncer_v2::ModelTypeStore>()));
-}
-
-} // namespace
-
-class ModelTypeRegistryTest : public ::testing::Test {
+class ModelTypeRegistryTest : public ::testing::Test,
+ syncer_v2::FakeModelTypeService {
public:
ModelTypeRegistryTest();
void SetUp() override;
@@ -54,6 +46,12 @@ class ModelTypeRegistryTest : public ::testing::Test {
return context.Pass();
}
+ protected:
+ scoped_ptr<syncer_v2::SharedModelTypeProcessor> MakeModelTypeProcessor(
+ ModelType type) {
+ return make_scoped_ptr(new syncer_v2::SharedModelTypeProcessor(type, this));
+ }
+
private:
syncable::Directory* directory();
« no previous file with comments | « sync/internal_api/test/fake_model_type_service.cc ('k') | sync/sync_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698