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

Unified Diff: sync/internal_api/public/base/model_type_test_util.cc

Issue 23238005: sync: Remove ModelTypeInvalidationMap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort entries in gyp files Created 7 years, 4 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/public/base/model_type_test_util.cc
diff --git a/sync/internal_api/public/base/model_type_test_util.cc b/sync/internal_api/public/base/model_type_test_util.cc
index 8c1164bec2bf0246815d2a0ca6249b2337c1e2ba..242b398bc0bfeeb99977804b937cf97efee6d28d 100644
--- a/sync/internal_api/public/base/model_type_test_util.cc
+++ b/sync/internal_api/public/base/model_type_test_util.cc
@@ -6,6 +6,25 @@
namespace syncer {
+ObjectIdInvalidationMap BuildInvalidationMap(
+ ModelType type,
+ int version,
+ const std::string& payload) {
+ ObjectIdInvalidationMap map;
+ invalidation::ObjectId id;
+ Invalidation invalidation;
+
+ bool result = RealModelTypeToObjectId(type, &id);
+ DCHECK(result)
+ << "Conversion of model type to object id failed: "
+ << ModelTypeToString(type);
+ invalidation.version = version;
+ invalidation.payload = payload;
+
+ map.insert(std::make_pair(id, invalidation));
+ return map;
+}
+
void PrintTo(ModelTypeSet model_types, ::std::ostream* os) {
*os << ModelTypeSetToString(model_types);
}
« no previous file with comments | « sync/internal_api/public/base/model_type_test_util.h ('k') | sync/internal_api/public/engine/model_safe_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698