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

Unified Diff: net/http/http_security_headers.cc

Issue 826423009: Treat HSTS and HPKP state independently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rsleevi comments Created 5 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 | « chrome/test/data/webui/net_internals/hsts_view.js ('k') | net/http/http_security_headers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_security_headers.cc
diff --git a/net/http/http_security_headers.cc b/net/http/http_security_headers.cc
index 8d0c1465307f8adb5da5eb61907e2a0b8b2d9da6..81a1dbfe6edf4dae8b5fdb4d7f8901fb7da14e8b 100644
--- a/net/http/http_security_headers.cc
+++ b/net/http/http_security_headers.cc
@@ -323,21 +323,7 @@ bool ParseHPKPHeader(const std::string& value,
*max_age = base::TimeDelta::FromSeconds(max_age_candidate);
*include_subdomains = include_subdomains_candidate;
- for (HashValueVector::const_iterator i = pins.begin();
- i != pins.end(); ++i) {
- bool found = false;
-
- for (HashValueVector::const_iterator j = hashes->begin();
- j != hashes->end(); ++j) {
- if (j->Equals(*i)) {
- found = true;
- break;
- }
- }
-
- if (!found)
- hashes->push_back(*i);
- }
+ hashes->swap(pins);
return true;
}
« no previous file with comments | « chrome/test/data/webui/net_internals/hsts_view.js ('k') | net/http/http_security_headers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698