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

Unified Diff: sync/internal_api/public/test/fake_model_type_service.h

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
Index: sync/internal_api/public/test/fake_model_type_service.h
diff --git a/sync/internal_api/public/test/fake_model_type_service.h b/sync/internal_api/public/test/fake_model_type_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..b64ed5d8498e9b03d99adc687e07f1737755e2c5
--- /dev/null
+++ b/sync/internal_api/public/test/fake_model_type_service.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_MODEL_TYPE_SERVICE_H_
+#define SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_MODEL_TYPE_SERVICE_H_
+
+#include "sync/api/data_batch.h"
+#include "sync/api/metadata_batch.h"
+#include "sync/api/metadata_change_list.h"
+#include "sync/api/model_type_service.h"
+
+namespace syncer_v2 {
+
+// A non-functional implementation of ModelTypeService for
+// testing purposes.
+class FakeModelTypeService : public ModelTypeService {
+ public:
+ FakeModelTypeService();
+ ~FakeModelTypeService() override;
+
+ scoped_ptr<MetadataChangeList> CreateMetadataChangeList() override;
+
+ syncer::SyncError MergeSyncData(
+ scoped_ptr<MetadataChangeList> metadata_change_list,
+ EntityDataList entity_data_list) override;
+
+ syncer::SyncError ApplySyncChanges(
+ scoped_ptr<MetadataChangeList> metadata_change_list,
+ EntityChangeList entity_changes) override;
+
+ void LoadMetadata(MetadataCallback callback) override;
+
+ void GetData(ClientKeyList client_keys, DataCallback callback) override;
+
+ void GetAllData(DataCallback callback) override;
+
+ std::string GetClientTag(const EntityData& entity_data) override;
+};
+
+} // namespace syncer_v2
+
+#endif // SYNC_INTERNAL_API_PUBLIC_TEST_FAKE_MODEL_TYPE_SERVICE_H_
« no previous file with comments | « sync/internal_api/public/shared_model_type_processor.h ('k') | sync/internal_api/shared_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698