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

Unified Diff: chrome/browser/extensions/convert_web_app.cc

Issue 7823004: Convert SHA256_LENGTH from a constant-in-anonymous-enum to a static const. This defines the cons... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 months 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: chrome/browser/extensions/convert_web_app.cc
===================================================================
--- chrome/browser/extensions/convert_web_app.cc (revision 98481)
+++ chrome/browser/extensions/convert_web_app.cc (working copy)
@@ -46,12 +46,11 @@
// auto-updated using ExtensionUpdater. But Chrome does notice updates to the
// manifest and regenerates these extensions.
std::string GenerateKey(const GURL& manifest_url) {
- char raw[crypto::SHA256_LENGTH] = {0};
+ char raw[crypto::kSHA256Length] = {0};
std::string key;
- crypto::SHA256HashString(manifest_url.spec().c_str(),
- raw,
- crypto::SHA256_LENGTH);
- base::Base64Encode(std::string(raw, crypto::SHA256_LENGTH), &key);
+ crypto::SHA256HashString(manifest_url.spec().c_str(), raw,
+ crypto::kSHA256Length);
wtc 2011/09/02 17:08:42 Nit: since 'raw' and crypto::kSHA256Length are rel
+ base::Base64Encode(std::string(raw, crypto::kSHA256Length), &key);
return key;
}

Powered by Google App Engine
This is Rietveld 408576698