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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 1211363005: Parse HPKP report-uri and persist in TransportSecurityPersister (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GetNext() fix Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_security_headers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 base::Time expiry = base::Time::Now() + base::TimeDelta::FromDays(1000); 827 base::Time expiry = base::Time::Now() + base::TimeDelta::FromDays(1000);
828 net::HashValueVector hashes; 828 net::HashValueVector hashes;
829 if (!hashes_str.empty()) { 829 if (!hashes_str.empty()) {
830 if (!Base64StringToHashes(hashes_str, &hashes)) 830 if (!Base64StringToHashes(hashes_str, &hashes))
831 return; 831 return;
832 } 832 }
833 833
834 transport_security_state->AddHSTS(domain, expiry, sts_include_subdomains); 834 transport_security_state->AddHSTS(domain, expiry, sts_include_subdomains);
835 transport_security_state->AddHPKP(domain, expiry, pkp_include_subdomains, 835 transport_security_state->AddHPKP(domain, expiry, pkp_include_subdomains,
836 hashes); 836 hashes, GURL());
837 } 837 }
838 838
839 void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete( 839 void NetInternalsMessageHandler::IOThreadImpl::OnHSTSDelete(
840 const base::ListValue* list) { 840 const base::ListValue* list) {
841 // |list| should be: [<domain to query>]. 841 // |list| should be: [<domain to query>].
842 std::string domain; 842 std::string domain;
843 CHECK(list->GetString(0, &domain)); 843 CHECK(list->GetString(0, &domain));
844 if (!base::IsStringASCII(domain)) { 844 if (!base::IsStringASCII(domain)) {
845 // There cannot be a unicode entry in the HSTS set. 845 // There cannot be a unicode entry in the HSTS set.
846 return; 846 return;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 } 1196 }
1197 1197
1198 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1198 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1199 : WebUIController(web_ui) { 1199 : WebUIController(web_ui) {
1200 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1200 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1201 1201
1202 // Set up the chrome://net-internals/ source. 1202 // Set up the chrome://net-internals/ source.
1203 Profile* profile = Profile::FromWebUI(web_ui); 1203 Profile* profile = Profile::FromWebUI(web_ui);
1204 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1204 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1205 } 1205 }
OLDNEW
« no previous file with comments | « no previous file | net/http/http_security_headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698