| 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 } else { | 1275 } else { |
| 1276 net::TransportSecurityState::DomainState state; | 1276 net::TransportSecurityState::DomainState state; |
| 1277 const bool found = transport_security_state->GetDomainState( | 1277 const bool found = transport_security_state->GetDomainState( |
| 1278 domain, true, &state); | 1278 domain, true, &state); |
| 1279 | 1279 |
| 1280 result->SetBoolean("result", found); | 1280 result->SetBoolean("result", found); |
| 1281 if (found) { | 1281 if (found) { |
| 1282 result->SetInteger("mode", static_cast<int>(state.upgrade_mode)); | 1282 result->SetInteger("mode", static_cast<int>(state.upgrade_mode)); |
| 1283 result->SetBoolean("sts_subdomains", state.sts_include_subdomains); | 1283 result->SetBoolean("sts_subdomains", state.sts_include_subdomains); |
| 1284 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains); | 1284 result->SetBoolean("pkp_subdomains", state.pkp_include_subdomains); |
| 1285 result->SetDouble("sts_observed", state.sts_observed.ToDoubleT()); |
| 1286 result->SetDouble("pkp_observed", state.pkp_observed.ToDoubleT()); |
| 1285 result->SetString("domain", state.domain); | 1287 result->SetString("domain", state.domain); |
| 1286 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT()); | 1288 result->SetDouble("expiry", state.upgrade_expiry.ToDoubleT()); |
| 1287 result->SetDouble("dynamic_spki_hashes_expiry", | 1289 result->SetDouble("dynamic_spki_hashes_expiry", |
| 1288 state.dynamic_spki_hashes_expiry.ToDoubleT()); | 1290 state.dynamic_spki_hashes_expiry.ToDoubleT()); |
| 1289 | 1291 |
| 1290 result->SetString("static_spki_hashes", | 1292 result->SetString("static_spki_hashes", |
| 1291 HashesToBase64String(state.static_spki_hashes)); | 1293 HashesToBase64String(state.static_spki_hashes)); |
| 1292 result->SetString("dynamic_spki_hashes", | 1294 result->SetString("dynamic_spki_hashes", |
| 1293 HashesToBase64String(state.dynamic_spki_hashes)); | 1295 HashesToBase64String(state.dynamic_spki_hashes)); |
| 1294 } | 1296 } |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 } | 1895 } |
| 1894 | 1896 |
| 1895 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) | 1897 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) |
| 1896 : WebUIController(web_ui) { | 1898 : WebUIController(web_ui) { |
| 1897 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); | 1899 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); |
| 1898 | 1900 |
| 1899 // Set up the chrome://net-internals/ source. | 1901 // Set up the chrome://net-internals/ source. |
| 1900 Profile* profile = Profile::FromWebUI(web_ui); | 1902 Profile* profile = Profile::FromWebUI(web_ui); |
| 1901 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); | 1903 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); |
| 1902 } | 1904 } |
| OLD | NEW |