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

Unified Diff: sync/syncable/syncable_util.h

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 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
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable_util.h
diff --git a/sync/syncable/syncable_util.h b/sync/syncable/syncable_util.h
index 425621e778fb3b6cf0529e6fc3b8edbc43275bf2..d00c6071914d84b1335b5e777b38078ea4b96663 100644
--- a/sync/syncable/syncable_util.h
+++ b/sync/syncable/syncable_util.h
@@ -5,9 +5,11 @@
#ifndef SYNC_SYNCABLE_SYNCABLE_UTIL_H_
#define SYNC_SYNCABLE_SYNCABLE_UTIL_H_
+#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "sync/internal_api/public/base/model_type.h"
namespace tracked_objects {
class Location;
@@ -35,6 +37,17 @@ bool SyncAssert(bool condition,
int GetUnsyncedEntries(BaseTransaction* trans,
std::vector<int64> *handles);
+// Generates a fixed-length tag for the given string under the given model_type.
+std::string GenerateSyncableHash(
+ ModelType model_type, const std::string& client_tag);
+
+// A helper for generating the bookmark type's tag. This is required in more
+// than one place, so we define the algorithm here to make sure the
+// implementation is consistent.
+std::string GenerateSyncableBookmarkHash(
+ const std::string originator_cache_guid,
+ const std::string originator_client_item_id);
+
} // namespace syncable
} // namespace syncer
« no previous file with comments | « sync/syncable/syncable_unittest.cc ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698