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

Side by Side 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, 10 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/android/connection_info_popup_android.h" 5 #include "chrome/browser/ui/android/connection_info_popup_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "chrome/browser/android/resource_mapper.h" 10 #include "chrome/browser/android/resource_mapper.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // site's identity was verified, then the headline contains the organization 130 // site's identity was verified, then the headline contains the organization
131 // name from the provided certificate. If the organization name is not 131 // name from the provided certificate. If the organization name is not
132 // available than the hostname of the site is used instead. 132 // available than the hostname of the site is used instead.
133 std::string headline; 133 std::string headline;
134 if (identity_info.cert_id) { 134 if (identity_info.cert_id) {
135 headline = identity_info.site_identity; 135 headline = identity_info.site_identity;
136 } 136 }
137 137
138 ScopedJavaLocalRef<jstring> description = 138 ScopedJavaLocalRef<jstring> description =
139 ConvertUTF8ToJavaString(env, identity_info.identity_status_description); 139 ConvertUTF8ToJavaString(env, identity_info.identity_status_description);
140 base::string16 certificate_label = 140 base::string16 certificate_label;
141 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON); 141
142 // Only show the certificate viewer link if the connection actually used a
143 // certificate.
144 if (identity_info.identity_status !=
145 WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT) {
146 certificate_label =
147 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
148 }
149
142 Java_ConnectionInfoPopup_addCertificateSection( 150 Java_ConnectionInfoPopup_addCertificateSection(
143 env, 151 env,
144 popup_jobject_.obj(), 152 popup_jobject_.obj(),
145 icon_id, 153 icon_id,
146 ConvertUTF8ToJavaString(env, headline).obj(), 154 ConvertUTF8ToJavaString(env, headline).obj(),
147 description.obj(), 155 description.obj(),
148 ConvertUTF16ToJavaString(env, certificate_label).obj()); 156 ConvertUTF16ToJavaString(env, certificate_label).obj());
149 157
150 if (identity_info.show_ssl_decision_revoke_button) { 158 if (identity_info.show_ssl_decision_revoke_button) {
151 base::string16 reset_button_label = l10n_util::GetStringUTF16( 159 base::string16 reset_button_label = l10n_util::GetStringUTF16(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // There's no tab UI on Android - only connection info is shown. 200 // There's no tab UI on Android - only connection info is shown.
193 NOTIMPLEMENTED(); 201 NOTIMPLEMENTED();
194 } 202 }
195 203
196 // static 204 // static
197 bool 205 bool
198 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( 206 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid(
199 JNIEnv* env) { 207 JNIEnv* env) {
200 return RegisterNativesImpl(env); 208 return RegisterNativesImpl(env);
201 } 209 }
OLDNEW
« 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