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

Side by Side Diff: sync/syncable/syncable_util.cc

Issue 86913002: Make base::Base64Encode() return void (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One more chromeos-specific fix. Created 7 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 unified diff | Download patch
« no previous file with comments | « sync/protocol/proto_value_conversions.cc ('k') | sync/test/fake_encryptor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/syncable/syncable_util.h" 5 #include "sync/syncable/syncable_util.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sha1.h" 10 #include "base/sha1.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ModelType model_type, const std::string& client_tag) { 94 ModelType model_type, const std::string& client_tag) {
95 // Blank PB with just the field in it has termination symbol, 95 // Blank PB with just the field in it has termination symbol,
96 // handy for delimiter. 96 // handy for delimiter.
97 sync_pb::EntitySpecifics serialized_type; 97 sync_pb::EntitySpecifics serialized_type;
98 AddDefaultFieldValue(model_type, &serialized_type); 98 AddDefaultFieldValue(model_type, &serialized_type);
99 std::string hash_input; 99 std::string hash_input;
100 serialized_type.AppendToString(&hash_input); 100 serialized_type.AppendToString(&hash_input);
101 hash_input.append(client_tag); 101 hash_input.append(client_tag);
102 102
103 std::string encode_output; 103 std::string encode_output;
104 CHECK(base::Base64Encode(base::SHA1HashString(hash_input), &encode_output)); 104 base::Base64Encode(base::SHA1HashString(hash_input), &encode_output);
105 return encode_output; 105 return encode_output;
106 } 106 }
107 107
108 std::string GenerateSyncableBookmarkHash( 108 std::string GenerateSyncableBookmarkHash(
109 const std::string& originator_cache_guid, 109 const std::string& originator_cache_guid,
110 const std::string& originator_client_item_id) { 110 const std::string& originator_client_item_id) {
111 return syncable::GenerateSyncableHash( 111 return syncable::GenerateSyncableHash(
112 BOOKMARKS, originator_cache_guid + originator_client_item_id); 112 BOOKMARKS, originator_cache_guid + originator_client_item_id);
113 } 113 }
114 114
115 } // namespace syncable 115 } // namespace syncable
116 } // namespace syncer 116 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/protocol/proto_value_conversions.cc ('k') | sync/test/fake_encryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698