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

Unified Diff: components/sync/syncable/syncable_util.cc

Issue 2502253003: [Sync] Move GenerateSyncableHash to base. (Closed)
Patch Set: Keep full syncable/ DEP. Created 4 years, 1 month 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 | « components/sync/syncable/syncable_util.h ('k') | components/sync/syncable/syncable_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/syncable_util.cc
diff --git a/components/sync/syncable/syncable_util.cc b/components/sync/syncable/syncable_util.cc
index ea5198aac3aea1be86936f8545c81076b5ab82f6..7ed0bc9a9822a77c98b872540e104ceabc38043a 100644
--- a/components/sync/syncable/syncable_util.cc
+++ b/components/sync/syncable/syncable_util.cc
@@ -4,10 +4,8 @@
#include "components/sync/syncable/syncable_util.h"
-#include "base/base64.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/sha1.h"
#include "components/sync/syncable/directory.h"
#include "components/sync/syncable/entry.h"
#include "components/sync/syncable/mutable_entry.h"
@@ -92,27 +90,5 @@ bool SyncAssert(bool condition,
return true;
}
-std::string GenerateSyncableHash(ModelType model_type,
- const std::string& client_tag) {
- // Blank PB with just the field in it has termination symbol,
- // handy for delimiter.
- sync_pb::EntitySpecifics serialized_type;
- AddDefaultFieldValue(model_type, &serialized_type);
- std::string hash_input;
- serialized_type.AppendToString(&hash_input);
- hash_input.append(client_tag);
-
- std::string encode_output;
- base::Base64Encode(base::SHA1HashString(hash_input), &encode_output);
- return encode_output;
-}
-
-std::string GenerateSyncableBookmarkHash(
- const std::string& originator_cache_guid,
- const std::string& originator_client_item_id) {
- return syncable::GenerateSyncableHash(
- BOOKMARKS, originator_cache_guid + originator_client_item_id);
-}
-
} // namespace syncable
} // namespace syncer
« no previous file with comments | « components/sync/syncable/syncable_util.h ('k') | components/sync/syncable/syncable_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698