OLD | NEW |
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/page_info/connection_info_popup_android.h" | 5 #include "chrome/browser/ui/android/page_info/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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 ScopedJavaLocalRef<jstring> description = | 105 ScopedJavaLocalRef<jstring> description = |
106 ConvertUTF8ToJavaString(env, identity_info.identity_status_description); | 106 ConvertUTF8ToJavaString(env, identity_info.identity_status_description); |
107 base::string16 certificate_label; | 107 base::string16 certificate_label; |
108 | 108 |
109 // Only show the certificate viewer link if the connection actually used a | 109 // Only show the certificate viewer link if the connection actually used a |
110 // certificate. | 110 // certificate. |
111 if (identity_info.identity_status != | 111 if (identity_info.identity_status != |
112 PageInfo::SITE_IDENTITY_STATUS_NO_CERT) { | 112 PageInfo::SITE_IDENTITY_STATUS_NO_CERT) { |
113 certificate_label = | 113 certificate_label = |
114 l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON); | 114 l10n_util::GetStringUTF16(IDS_PAGE_INFO_CERT_INFO_BUTTON); |
115 } | 115 } |
116 | 116 |
117 Java_ConnectionInfoPopup_addCertificateSection( | 117 Java_ConnectionInfoPopup_addCertificateSection( |
118 env, popup_jobject_, icon_id, ConvertUTF8ToJavaString(env, headline), | 118 env, popup_jobject_, icon_id, ConvertUTF8ToJavaString(env, headline), |
119 description, ConvertUTF16ToJavaString(env, certificate_label)); | 119 description, ConvertUTF16ToJavaString(env, certificate_label)); |
120 | 120 |
121 if (identity_info.show_ssl_decision_revoke_button) { | 121 if (identity_info.show_ssl_decision_revoke_button) { |
122 base::string16 reset_button_label = l10n_util::GetStringUTF16( | 122 base::string16 reset_button_label = l10n_util::GetStringUTF16( |
123 IDS_PAGEINFO_RESET_INVALID_CERTIFICATE_DECISIONS_BUTTON); | 123 IDS_PAGE_INFO_RESET_INVALID_CERTIFICATE_DECISIONS_BUTTON); |
124 Java_ConnectionInfoPopup_addResetCertDecisionsButton( | 124 Java_ConnectionInfoPopup_addResetCertDecisionsButton( |
125 env, popup_jobject_, | 125 env, popup_jobject_, |
126 ConvertUTF16ToJavaString(env, reset_button_label)); | 126 ConvertUTF16ToJavaString(env, reset_button_label)); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 { | 130 { |
131 int icon_id = ResourceMapper::MapFromChromiumId( | 131 int icon_id = ResourceMapper::MapFromChromiumId( |
132 PageInfoUI::GetConnectionIconID(identity_info.connection_status)); | 132 PageInfoUI::GetConnectionIconID(identity_info.connection_status)); |
133 | 133 |
(...skipping 20 matching lines...) Expand all Loading... |
154 ChosenObjectInfoList chosen_object_info_list) { | 154 ChosenObjectInfoList chosen_object_info_list) { |
155 NOTIMPLEMENTED(); | 155 NOTIMPLEMENTED(); |
156 } | 156 } |
157 | 157 |
158 // static | 158 // static |
159 bool | 159 bool |
160 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( | 160 ConnectionInfoPopupAndroid::RegisterConnectionInfoPopupAndroid( |
161 JNIEnv* env) { | 161 JNIEnv* env) { |
162 return RegisterNativesImpl(env); | 162 return RegisterNativesImpl(env); |
163 } | 163 } |
OLD | NEW |