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

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

Issue 578553004: Remove the "snionly" concept from the HSTS preload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 6 years, 3 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
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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 if (!base::IsStringASCII(domain)) { 1081 if (!base::IsStringASCII(domain)) {
1082 result->SetString("error", "non-ASCII domain name"); 1082 result->SetString("error", "non-ASCII domain name");
1083 } else { 1083 } else {
1084 net::TransportSecurityState* transport_security_state = 1084 net::TransportSecurityState* transport_security_state =
1085 GetMainContext()->transport_security_state(); 1085 GetMainContext()->transport_security_state();
1086 if (!transport_security_state) { 1086 if (!transport_security_state) {
1087 result->SetString("error", "no TransportSecurityState active"); 1087 result->SetString("error", "no TransportSecurityState active");
1088 } else { 1088 } else {
1089 net::TransportSecurityState::DomainState static_state; 1089 net::TransportSecurityState::DomainState static_state;
1090 const bool found_static = transport_security_state->GetStaticDomainState( 1090 const bool found_static = transport_security_state->GetStaticDomainState(
1091 domain, true, &static_state); 1091 domain, &static_state);
1092 if (found_static) { 1092 if (found_static) {
1093 result->SetBoolean("has_static_sts", 1093 result->SetBoolean("has_static_sts",
1094 found_static && static_state.ShouldUpgradeToSSL()); 1094 found_static && static_state.ShouldUpgradeToSSL());
1095 result->SetInteger("static_upgrade_mode", 1095 result->SetInteger("static_upgrade_mode",
1096 static_cast<int>(static_state.sts.upgrade_mode)); 1096 static_cast<int>(static_state.sts.upgrade_mode));
1097 result->SetBoolean("static_sts_include_subdomains", 1097 result->SetBoolean("static_sts_include_subdomains",
1098 static_state.sts.include_subdomains); 1098 static_state.sts.include_subdomains);
1099 result->SetDouble("static_sts_observed", 1099 result->SetDouble("static_sts_observed",
1100 static_state.sts.last_observed.ToDoubleT()); 1100 static_state.sts.last_observed.ToDoubleT());
1101 result->SetDouble("static_sts_expiry", 1101 result->SetDouble("static_sts_expiry",
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 } 1709 }
1710 1710
1711 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1711 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1712 : WebUIController(web_ui) { 1712 : WebUIController(web_ui) {
1713 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1713 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
1714 1714
1715 // Set up the chrome://net-internals/ source. 1715 // Set up the chrome://net-internals/ source.
1716 Profile* profile = Profile::FromWebUI(web_ui); 1716 Profile* profile = Profile::FromWebUI(web_ui);
1717 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 1717 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
1718 } 1718 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698