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

Unified Diff: sync/internal_api/test/fake_model_type_service.cc

Issue 1763953002: [USS] Change the place where SharedModelTypeProcessor got created (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update base on Max and Sky's comment 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: sync/internal_api/test/fake_model_type_service.cc
diff --git a/sync/internal_api/test/fake_model_type_service.cc b/sync/internal_api/test/fake_model_type_service.cc
index 8f1e14c9f22b4279c583d078aec1bdbf43aa6c30..e2ac7c9264ec52a9271a893b238b93cfc6a0d472 100644
--- a/sync/internal_api/test/fake_model_type_service.cc
+++ b/sync/internal_api/test/fake_model_type_service.cc
@@ -4,9 +4,14 @@
#include "sync/internal_api/public/test/fake_model_type_service.h"
+#include "base/bind.h"
+
namespace syncer_v2 {
-FakeModelTypeService::FakeModelTypeService() {}
+FakeModelTypeService::FakeModelTypeService()
+ : ModelTypeService(
+ base::Bind(&FakeModelTypeService::CreateProcessorForTestWrapper,
+ base::Unretained(this))) {}
FakeModelTypeService::~FakeModelTypeService() {}
@@ -38,4 +43,20 @@ std::string FakeModelTypeService::GetClientTag(const EntityData& entity_data) {
void FakeModelTypeService::OnChangeProcessorSet() {}
+syncer::ModelType FakeModelTypeService::type() const {
+ return syncer::DEVICE_INFO;
+}
+
+ModelTypeChangeProcessor* FakeModelTypeService::CreateProcessorForTest(
+ syncer::ModelType type,
+ ModelTypeService* service) {
+ return nullptr;
+}
+
+scoped_ptr<ModelTypeChangeProcessor>
+FakeModelTypeService::CreateProcessorForTestWrapper(syncer::ModelType type,
+ ModelTypeService* service) {
+ return make_scoped_ptr(CreateProcessorForTest(type, service));
+}
+
} // namespace syncer_v2

Powered by Google App Engine
This is Rietveld 408576698