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

Unified Diff: chrome/browser/net/transport_security_persister.cc

Issue 11274032: Separate http_security_headers from transport_security_state (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « AUTHORS ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/transport_security_persister.cc
===================================================================
--- chrome/browser/net/transport_security_persister.cc (revision 175486)
+++ chrome/browser/net/transport_security_persister.cc (working copy)
@@ -29,16 +29,8 @@
ListValue* SPKIHashesToListValue(const HashValueVector& hashes) {
ListValue* pins = new ListValue;
-
- for (HashValueVector::const_iterator i = hashes.begin();
- i != hashes.end(); ++i) {
- std::string hash_str(reinterpret_cast<const char*>(i->data()), i->size());
- std::string b64;
- if (base::Base64Encode(hash_str, &b64))
- pins->Append(new StringValue(TransportSecurityState::HashValueLabel(*i) +
- b64));
- }
-
+ for (size_t i = 0; i != hashes.size(); i++)
+ pins->Append(new StringValue(hashes[i].ToString()));
return pins;
}
@@ -48,7 +40,7 @@
std::string type_and_base64;
HashValue fingerprint;
if (pins.GetString(i, &type_and_base64) &&
- TransportSecurityState::ParsePin(type_and_base64, &fingerprint)) {
+ fingerprint.FromString(type_and_base64)) {
hashes->push_back(fingerprint);
}
}
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698