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

Unified Diff: sync/internal_api/base_node.cc

Issue 11571092: sync: Move unique_client_tag hashing code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: sync/internal_api/base_node.cc
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
index 19de5728203d4c662538abd59654867d01710f2e..f640532bdd95a1563d322bde69eaef626af8a6b1 100644
--- a/sync/internal_api/base_node.cc
+++ b/sync/internal_api/base_node.cc
@@ -6,8 +6,6 @@
#include <stack>
-#include "base/base64.h"
-#include "base/sha1.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
@@ -65,21 +63,6 @@ BaseNode::BaseNode() : password_data_(new sync_pb::PasswordSpecificsData) {}
BaseNode::~BaseNode() {}
-std::string BaseNode::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;
- CHECK(base::Base64Encode(base::SHA1HashString(hash_input), &encode_output));
- return encode_output;
-}
-
bool BaseNode::DecryptIfNecessary() {
if (!GetEntry()->Get(syncable::UNIQUE_SERVER_TAG).empty())
return true; // Ignore unique folders.
« no previous file with comments | « no previous file | sync/internal_api/public/base_node.h » ('j') | sync/internal_api/sync_manager_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698