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

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

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fixes comments by eroman Created 9 years, 8 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
« no previous file with comments | « chrome/browser/enumerate_modules_model_win.cc ('k') | chrome/browser/extensions/convert_web_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/convert_user_script.cc
===================================================================
--- chrome/browser/extensions/convert_user_script.cc (revision 81350)
+++ chrome/browser/extensions/convert_user_script.cc (working copy)
@@ -12,8 +12,8 @@
#include "base/file_util.h"
#include "base/memory/scoped_temp_dir.h"
#include "base/path_service.h"
-#include "base/sha2.h"
#include "base/string_util.h"
+#include "crypto/sha2.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension.h"
@@ -72,10 +72,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[base::SHA256_LENGTH] = {0};
+ char raw[crypto::SHA256_LENGTH] = {0};
std::string key;
- base::SHA256HashString(script_name, raw, base::SHA256_LENGTH);
- base::Base64Encode(std::string(raw, base::SHA256_LENGTH), &key);
+ crypto::SHA256HashString(script_name, raw, crypto::SHA256_LENGTH);
+ base::Base64Encode(std::string(raw, crypto::SHA256_LENGTH), &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 | « chrome/browser/enumerate_modules_model_win.cc ('k') | chrome/browser/extensions/convert_web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698