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

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

Issue 19269012: Don't persist HPKP if PrivacyMode is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed ChromeResourceDispatcherHostDelegate::OnResponseStarted to use URLRequest::GetHSTSRedirect. Created 7 years, 4 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 | Annotate | Revision Log
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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 if (!IsStringASCII(domain)) { 1251 if (!IsStringASCII(domain)) {
1252 result->SetString("error", "non-ASCII domain name"); 1252 result->SetString("error", "non-ASCII domain name");
1253 } else { 1253 } else {
1254 net::TransportSecurityState* transport_security_state = 1254 net::TransportSecurityState* transport_security_state =
1255 GetMainContext()->transport_security_state(); 1255 GetMainContext()->transport_security_state();
1256 if (!transport_security_state) { 1256 if (!transport_security_state) {
1257 result->SetString("error", "no TransportSecurityState active"); 1257 result->SetString("error", "no TransportSecurityState active");
1258 } else { 1258 } else {
1259 net::TransportSecurityState::DomainState state; 1259 net::TransportSecurityState::DomainState state;
1260 const bool found = transport_security_state->GetDomainState( 1260 const bool found = transport_security_state->GetDomainState(
1261 domain, true, &state); 1261 domain, true, true, &state);
1262 1262
1263 result->SetBoolean("result", found); 1263 result->SetBoolean("result", found);
1264 if (found) { 1264 if (found) {
1265 result->SetInteger("mode", static_cast<int>(state.upgrade_mode)); 1265 result->SetInteger("mode", static_cast<int>(state.upgrade_mode));
1266 result->SetBoolean("sts_subdomains", state.sts_include_subdomains); 1266 result->SetBoolean("sts_subdomains", state.sts_include_subdomains);
1267 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains); 1267 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains);
1268 result->SetString("domain", state.domain); 1268 result->SetString("domain", state.domain);
1269 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT()); 1269 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT());
1270 result->SetDouble("dynamic_spki_hashes_expiry", 1270 result->SetDouble("dynamic_spki_hashes_expiry",
1271 state.dynamic_spki_hashes_expiry.ToDoubleT()); 1271 state.dynamic_spki_hashes_expiry.ToDoubleT());
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 1869
1870 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1870 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1871 : WebUIController(web_ui) { 1871 : WebUIController(web_ui) {
1872 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1872 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1873 1873
1874 // Set up the chrome://net-internals/ source. 1874 // Set up the chrome://net-internals/ source.
1875 Profile* profile = Profile::FromWebUI(web_ui); 1875 Profile* profile = Profile::FromWebUI(web_ui);
1876 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1876 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1877 } 1877 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698