Chromium Code Reviews| 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 = |