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

Unified Diff: sync/notifier/invalidation_util.h

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidation_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidation_util.h
diff --git a/sync/notifier/invalidation_util.h b/sync/notifier/invalidation_util.h
index 2f3198bc42a63d84ac4220360914dc9544141048..61bd3171d462e23e77ad9e3acd308391ff330b79 100644
--- a/sync/notifier/invalidation_util.h
+++ b/sync/notifier/invalidation_util.h
@@ -11,8 +11,13 @@
#include <set>
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "sync/internal_api/public/base/model_type.h"
+namespace base {
+class DictionaryValue;
+} // namespace
+
namespace invalidation {
class Invalidation;
@@ -38,11 +43,18 @@ bool RealModelTypeToObjectId(ModelType model_type,
bool ObjectIdToRealModelType(const invalidation::ObjectId& object_id,
ModelType* model_type);
-ObjectIdSet ModelTypeSetToObjectIdSet(const ModelTypeSet& models);
-ModelTypeSet ObjectIdSetToModelTypeSet(const ObjectIdSet& ids);
+// Caller owns the returned DictionaryValue.
+scoped_ptr<base::DictionaryValue> ObjectIdToValue(
+ const invalidation::ObjectId& object_id);
+
+bool ObjectIdFromValue(const base::DictionaryValue& value,
+ invalidation::ObjectId* out);
std::string ObjectIdToString(const invalidation::ObjectId& object_id);
+ObjectIdSet ModelTypeSetToObjectIdSet(const ModelTypeSet& models);
+ModelTypeSet ObjectIdSetToModelTypeSet(const ObjectIdSet& ids);
+
std::string InvalidationToString(
const invalidation::Invalidation& invalidation);
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidation_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698