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

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: 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..733a64cb710a5ad0f9a5dd56d1ff83d35cd246ef 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,22 @@
namespace syncer {
+ObjectIdInvalidationMap BuildInvalidationMap(
+ ModelType type,
+ int version,
+ const std::string& payload) {
+ ObjectIdInvalidationMap map;
+ invalidation::ObjectId id;
+ Invalidation invalidation;
+
+ DCHECK(RealModelTypeToObjectId(type, &id));
tim (not reviewing) 2013/08/28 00:13:00 You shouldn't put "real code" inside DCHECKs like
rlarocque 2013/08/28 01:00:35 Thanks for catching this. It would have taken me
+ 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);
}

Powered by Google App Engine
This is Rietveld 408576698