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

Unified Diff: net/base/transport_security_state.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 | « net/base/test_root_certs_openssl.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/transport_security_state.cc
===================================================================
--- net/base/transport_security_state.cc (revision 81350)
+++ net/base/transport_security_state.cc (working copy)
@@ -9,12 +9,12 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/sha2.h"
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
+#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
#include "net/base/dns_util.h"
@@ -36,8 +36,8 @@
if (IsPreloadedSTS(canonicalized_host, true, &temp))
return;
- char hashed[base::SHA256_LENGTH];
- base::SHA256HashString(canonicalized_host, hashed, sizeof(hashed));
+ char hashed[crypto::SHA256_LENGTH];
+ crypto::SHA256HashString(canonicalized_host, hashed, sizeof(hashed));
// Use the original creation date if we already have this host.
DomainState state_copy(state);
@@ -58,8 +58,8 @@
if (canonicalized_host.empty())
return false;
- char hashed[base::SHA256_LENGTH];
- base::SHA256HashString(canonicalized_host, hashed, sizeof(hashed));
+ char hashed[crypto::SHA256_LENGTH];
+ crypto::SHA256HashString(canonicalized_host, hashed, sizeof(hashed));
std::map<std::string, DomainState>::iterator i = enabled_hosts_.find(
std::string(hashed, sizeof(hashed)));
@@ -99,10 +99,10 @@
base::Time current_time(base::Time::Now());
for (size_t i = 0; canonicalized_host[i]; i += canonicalized_host[i] + 1) {
- char hashed_domain[base::SHA256_LENGTH];
+ char hashed_domain[crypto::SHA256_LENGTH];
- base::SHA256HashString(IncludeNUL(&canonicalized_host[i]), &hashed_domain,
- sizeof(hashed_domain));
+ crypto::SHA256HashString(IncludeNUL(&canonicalized_host[i]), &hashed_domain,
+ sizeof(hashed_domain));
std::map<std::string, DomainState>::iterator j =
enabled_hosts_.find(std::string(hashed_domain, sizeof(hashed_domain)));
if (j == enabled_hosts_.end())
@@ -281,7 +281,7 @@
static std::string ExternalStringToHashedDomain(const std::string& external) {
std::string out;
if (!base::Base64Decode(external, &out) ||
- out.size() != base::SHA256_LENGTH) {
+ out.size() != crypto::SHA256_LENGTH) {
return std::string();
}
« no previous file with comments | « net/base/test_root_certs_openssl.cc ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698