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

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

Issue 1541733002: Android OIB: Do not show Certificate Viewer for http connections (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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/pageinfo/ConnectionInfoPopup.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/connection_info_popup_android.cc
diff --git a/chrome/browser/ui/android/connection_info_popup_android.cc b/chrome/browser/ui/android/connection_info_popup_android.cc
index 966788d148294a49e38348724305641c71526659..32f251521294604f6c552fa56552df1608d3f34a 100644
--- a/chrome/browser/ui/android/connection_info_popup_android.cc
+++ b/chrome/browser/ui/android/connection_info_popup_android.cc
@@ -137,8 +137,16 @@ void ConnectionInfoPopupAndroid::SetIdentityInfo(
ScopedJavaLocalRef<jstring> description =
ConvertUTF8ToJavaString(env, identity_info.identity_status_description);
- base::string16 certificate_label =
- l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
+ base::string16 certificate_label;
+
+ // Only show the certificate viewer link if the connection actually used a
+ // certificate.
+ if (identity_info.identity_status !=
+ WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT) {
+ certificate_label =
+ l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
+ }
+
Java_ConnectionInfoPopup_addCertificateSection(
env,
popup_jobject_.obj(),
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/pageinfo/ConnectionInfoPopup.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698