| OLD | NEW |
| 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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 } else { | 1218 } else { |
| 1219 net::TransportSecurityState::DomainState state; | 1219 net::TransportSecurityState::DomainState state; |
| 1220 const bool found = transport_security_state->GetDomainState( | 1220 const bool found = transport_security_state->GetDomainState( |
| 1221 domain, true, &state); | 1221 domain, true, &state); |
| 1222 | 1222 |
| 1223 result->SetBoolean("result", found); | 1223 result->SetBoolean("result", found); |
| 1224 if (found) { | 1224 if (found) { |
| 1225 result->SetInteger("mode", static_cast<int>(state.upgrade_mode)); | 1225 result->SetInteger("mode", static_cast<int>(state.upgrade_mode)); |
| 1226 result->SetBoolean("sts_subdomains", state.sts_include_subdomains); | 1226 result->SetBoolean("sts_subdomains", state.sts_include_subdomains); |
| 1227 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains); | 1227 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains); |
| 1228 result->SetDouble("sts_observed", state.sts_observed.ToDoubleT()); |
| 1229 result->SetDouble("pkp_observed", state.pkp_observed.ToDoubleT()); |
| 1228 result->SetString("domain", state.domain); | 1230 result->SetString("domain", state.domain); |
| 1229 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT()); | 1231 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT()); |
| 1230 result->SetDouble("dynamic_spki_hashes_expiry", | 1232 result->SetDouble("dynamic_spki_hashes_expiry", |
| 1231 state.dynamic_spki_hashes_expiry.ToDoubleT()); | 1233 state.dynamic_spki_hashes_expiry.ToDoubleT()); |
| 1232 | 1234 |
| 1233 result->SetString("static_spki_hashes", | 1235 result->SetString("static_spki_hashes", |
| 1234 HashesToBase64String(state.static_spki_hashes)); | 1236 HashesToBase64String(state.static_spki_hashes)); |
| 1235 result->SetString("dynamic_spki_hashes", | 1237 result->SetString("dynamic_spki_hashes", |
| 1236 HashesToBase64String(state.dynamic_spki_hashes)); | 1238 HashesToBase64String(state.dynamic_spki_hashes)); |
| 1237 } | 1239 } |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 } | 1838 } |
| 1837 | 1839 |
| 1838 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1840 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
| 1839 : WebUIController(web_ui) { | 1841 : WebUIController(web_ui) { |
| 1840 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1842 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
| 1841 | 1843 |
| 1842 // Set up the chrome://net-internals/ source. | 1844 // Set up the chrome://net-internals/ source. |
| 1843 Profile* profile = Profile::FromWebUI(web_ui); | 1845 Profile* profile = Profile::FromWebUI(web_ui); |
| 1844 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 1846 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
| 1845 } | 1847 } |
| OLD | NEW |