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

Side by Side Diff: trunk/src/chrome/browser/extensions/install_signer.cc

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | Annotate | Revision Log
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 base::Base64Encode(result_bytes, result); 118 return base::Base64Encode(result_bytes, result);
119 return true;
120 } 119 }
121 120
122 } // namespace 121 } // namespace
123 122
124 namespace extensions { 123 namespace extensions {
125 124
126 InstallSignature::InstallSignature() { 125 InstallSignature::InstallSignature() {
127 } 126 }
128 InstallSignature::~InstallSignature() { 127 InstallSignature::~InstallSignature() {
129 } 128 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 result->expire_date = expire_date; 283 result->expire_date = expire_date;
285 DCHECK(VerifySignature(*result)); 284 DCHECK(VerifySignature(*result));
286 } 285 }
287 286
288 if (!callback_.is_null()) 287 if (!callback_.is_null())
289 callback_.Run(result.Pass()); 288 callback_.Run(result.Pass());
290 } 289 }
291 290
292 291
293 } // namespace extensions 292 } // namespace extensions
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/extensions/extension_protocols.cc ('k') | trunk/src/chrome/browser/internal_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698