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

Unified Diff: chrome/browser/extensions/convert_user_script.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_user_script.cc
===================================================================
--- chrome/browser/extensions/convert_user_script.cc (revision 98481)
+++ chrome/browser/extensions/convert_user_script.cc (working copy)
@@ -73,10 +73,10 @@
// identity is its namespace+name, so we hash that to create a public key.
// There will be no corresponding private key, which means user scripts cannot
// be auto-updated, or claimed in the gallery.
- char raw[crypto::SHA256_LENGTH] = {0};
+ char raw[crypto::kSHA256Length] = {0};
std::string key;
- crypto::SHA256HashString(script_name, raw, crypto::SHA256_LENGTH);
- base::Base64Encode(std::string(raw, crypto::SHA256_LENGTH), &key);
+ crypto::SHA256HashString(script_name, raw, crypto::kSHA256Length);
+ base::Base64Encode(std::string(raw, crypto::kSHA256Length), &key);
// The script may not have a name field, but we need one for an extension. If
// it is missing, use the filename of the original URL.
« no previous file with comments | « no previous file | chrome/browser/extensions/convert_web_app.cc » ('j') | chrome/browser/extensions/convert_web_app.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698