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

Side by Side Diff: chrome/browser/extensions/install_signer.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 | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/internal_auth.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/extensions/install_signer.h" 5 #include "chrome/browser/extensions/install_signer.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 scoped_ptr<crypto::SecureHash> hash( 109 scoped_ptr<crypto::SecureHash> hash(
110 crypto::SecureHash::Create(crypto::SecureHash::SHA256)); 110 crypto::SecureHash::Create(crypto::SecureHash::SHA256));
111 111
112 hash->Update(machine_id.data(), machine_id.size()); 112 hash->Update(machine_id.data(), machine_id.size());
113 hash->Update(salt.data(), salt.size()); 113 hash->Update(salt.data(), salt.size());
114 114
115 std::string result_bytes(crypto::kSHA256Length, 0); 115 std::string result_bytes(crypto::kSHA256Length, 0);
116 hash->Finish(string_as_array(&result_bytes), result_bytes.size()); 116 hash->Finish(string_as_array(&result_bytes), result_bytes.size());
117 117
118 return base::Base64Encode(result_bytes, result); 118 base::Base64Encode(result_bytes, result);
119 return true;
119 } 120 }
120 121
121 } // namespace 122 } // namespace
122 123
123 namespace extensions { 124 namespace extensions {
124 125
125 InstallSignature::InstallSignature() { 126 InstallSignature::InstallSignature() {
126 } 127 }
127 InstallSignature::~InstallSignature() { 128 InstallSignature::~InstallSignature() {
128 } 129 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 result->expire_date = expire_date; 284 result->expire_date = expire_date;
284 DCHECK(VerifySignature(*result)); 285 DCHECK(VerifySignature(*result));
285 } 286 }
286 287
287 if (!callback_.is_null()) 288 if (!callback_.is_null())
288 callback_.Run(result.Pass()); 289 callback_.Run(result.Pass());
289 } 290 }
290 291
291 292
292 } // namespace extensions 293 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698