| Index: chrome/browser/ui/android/website_settings_popup_legacy_android.cc
|
| diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_legacy_android.cc
|
| similarity index 81%
|
| copy from chrome/browser/ui/android/website_settings_popup_android.cc
|
| copy to chrome/browser/ui/android/website_settings_popup_legacy_android.cc
|
| index e4bfc920e4796654f75cb99127aaf6101a4839ff..994d371ab72b15db62efa48ae18bac326836026f 100644
|
| --- a/chrome/browser/ui/android/website_settings_popup_android.cc
|
| +++ b/chrome/browser/ui/android/website_settings_popup_legacy_android.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/ui/android/website_settings_popup_android.h"
|
| +#include "chrome/browser/ui/android/website_settings_popup_legacy_android.h"
|
|
|
| #include "base/android/jni_android.h"
|
| #include "base/android/jni_array.h"
|
| @@ -18,7 +18,7 @@
|
| #include "content/public/browser/navigation_entry.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/ssl_status.h"
|
| -#include "jni/WebsiteSettingsPopup_jni.h"
|
| +#include "jni/WebsiteSettingsPopupLegacy_jni.h"
|
| #include "net/cert/x509_certificate.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| @@ -75,10 +75,10 @@ static jlong Init(JNIEnv* env,
|
| content::WebContents::FromJavaWebContents(java_web_contents);
|
|
|
| return reinterpret_cast<intptr_t>(
|
| - new WebsiteSettingsPopupAndroid(env, obj, web_contents));
|
| + new WebsiteSettingsPopupLegacyAndroid(env, obj, web_contents));
|
| }
|
|
|
| -WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid(
|
| +WebsiteSettingsPopupLegacyAndroid::WebsiteSettingsPopupLegacyAndroid(
|
| JNIEnv* env,
|
| jobject java_website_settings_pop,
|
| WebContents* web_contents) {
|
| @@ -100,20 +100,21 @@ WebsiteSettingsPopupAndroid::WebsiteSettingsPopupAndroid(
|
| content::CertStore::GetInstance()));
|
| }
|
|
|
| -WebsiteSettingsPopupAndroid::~WebsiteSettingsPopupAndroid() {}
|
| +WebsiteSettingsPopupLegacyAndroid::~WebsiteSettingsPopupLegacyAndroid() {
|
| +}
|
|
|
| -void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) {
|
| +void WebsiteSettingsPopupLegacyAndroid::Destroy(JNIEnv* env, jobject obj) {
|
| delete this;
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::ResetCertDecisions(
|
| +void WebsiteSettingsPopupLegacyAndroid::ResetCertDecisions(
|
| JNIEnv* env,
|
| jobject obj,
|
| jobject java_web_contents) {
|
| presenter_->OnRevokeSSLErrorBypassButtonPressed();
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetIdentityInfo(
|
| const IdentityInfo& identity_info) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
|
|
| @@ -131,11 +132,11 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| headline = identity_info.site_identity;
|
| }
|
|
|
| - ScopedJavaLocalRef<jstring> description = ConvertUTF8ToJavaString(
|
| - env, identity_info.identity_status_description);
|
| + ScopedJavaLocalRef<jstring> description =
|
| + ConvertUTF8ToJavaString(env, identity_info.identity_status_description);
|
| base::string16 certificate_label =
|
| l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
|
| - Java_WebsiteSettingsPopup_addCertificateSection(
|
| + Java_WebsiteSettingsPopupLegacy_addCertificateSection(
|
| env,
|
| popup_jobject_.obj(),
|
| icon_id,
|
| @@ -146,7 +147,7 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| if (identity_info.show_ssl_decision_revoke_button) {
|
| base::string16 reset_button_label = l10n_util::GetStringUTF16(
|
| IDS_PAGEINFO_RESET_INVALID_CERTIFICATE_DECISIONS_BUTTON);
|
| - Java_WebsiteSettingsPopup_addResetCertDecisionsButton(
|
| + Java_WebsiteSettingsPopupLegacy_addResetCertDecisionsButton(
|
| env,
|
| popup_jobject_.obj(),
|
| ConvertUTF16ToJavaString(env, reset_button_label).obj());
|
| @@ -160,39 +161,42 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
|
|
| ScopedJavaLocalRef<jstring> description = ConvertUTF8ToJavaString(
|
| env, identity_info.connection_status_description);
|
| - Java_WebsiteSettingsPopup_addDescriptionSection(
|
| + Java_WebsiteSettingsPopupLegacy_addDescriptionSection(
|
| env, popup_jobject_.obj(), icon_id, NULL, description.obj());
|
| }
|
|
|
| - Java_WebsiteSettingsPopup_addMoreInfoLink(env, popup_jobject_.obj(),
|
| + Java_WebsiteSettingsPopupLegacy_addMoreInfoLink(
|
| + env,
|
| + popup_jobject_.obj(),
|
| ConvertUTF8ToJavaString(
|
| env, l10n_util::GetStringUTF8(IDS_PAGE_INFO_HELP_CENTER_LINK)).obj());
|
| - Java_WebsiteSettingsPopup_showDialog(env, popup_jobject_.obj());
|
| + Java_WebsiteSettingsPopupLegacy_showDialog(env, popup_jobject_.obj());
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetCookieInfo(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetCookieInfo(
|
| const CookieInfoList& cookie_info_list) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetPermissionInfo(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetPermissionInfo(
|
| const PermissionInfoList& permission_info_list) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetSelectedTab(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetSelectedTab(
|
| WebsiteSettingsUI::TabId tab_id) {
|
| // There's no tab UI on Android - only connection info is shown.
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetFirstVisit(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetFirstVisit(
|
| const base::string16& first_visit) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| // static
|
| -bool WebsiteSettingsPopupAndroid::RegisterWebsiteSettingsPopupAndroid(
|
| +bool
|
| +WebsiteSettingsPopupLegacyAndroid::RegisterWebsiteSettingsPopupLegacyAndroid(
|
| JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|