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

Unified Diff: chrome/browser/ui/browser.cc

Issue 1589703002: Surface SCT (Signed Certificate Timestamp) counts in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 717381dfc44ad34716308ce06f5a11385705195a..dc7dddb6d45e8a4ab24b07f9fbe03960d41ff83d 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1414,6 +1414,34 @@ content::SecurityStyle Browser::GetSecurityStyle(
return security_style;
}
+void Browser::GetCertificateTransparencySummary(bool is_valid_ev,
pfeldman 2016/01/23 01:04:55 So we are introducing remote debugging method so t
lgarron 2016/01/23 01:20:15 Yes, exactly. :-/
Ryan Sleevi 2016/01/23 01:24:34 I'm not sure I understand what you're asking.
lgarron 2016/01/26 02:33:26 Fundamentally, this CL is about calculating a stri
+ int num_unknown_scts,
+ int num_invalid_scts,
+ int num_valid_scts,
+ std::string* summary) {
+ if (num_unknown_scts == 0 && num_invalid_scts == 0 && num_valid_scts == 0) {
+ // No SCTs - no CT information.
+ *summary =
+ l10n_util::GetStringUTF8(IDS_SIGNED_CERTIFICATE_TIMESTAMPS_NOT_PRESENT);
+ } else if (num_valid_scts > 0) {
+ // Any valid SCT.
+ if (is_valid_ev)
+ *summary =
+ l10n_util::GetStringUTF8(IDS_SIGNED_CERTIFICATE_TIMESTAMPS_VALID_EV);
+ else
+ *summary =
+ l10n_util::GetStringUTF8(IDS_SIGNED_CERTIFICATE_TIMESTAMPS_VALID);
+ } else if (num_invalid_scts > 0) {
+ // Any invalid SCT.
+ *summary =
+ l10n_util::GetStringUTF8(IDS_SIGNED_CERTIFICATE_TIMESTAMPS_INVALID);
+ } else {
+ // All SCTs are from unknown logs.
+ *summary =
+ l10n_util::GetStringUTF8(IDS_SIGNED_CERTIFICATE_TIMESTAMPS_UNKNOWN);
+ }
+}
+
void Browser::ShowCertificateViewerInDevTools(
content::WebContents* web_contents, int cert_id) {
DevToolsWindow* devtools_window =

Powered by Google App Engine
This is Rietveld 408576698