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

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

Issue 18554002: Distinguish STS observation times from PKP observation times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TODO to clean up the JavaScript. Created 7 years 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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/hsts_view.js ('k') | chrome/test/data/webui/net_internals/hsts_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698