| 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 82%
|
| copy from chrome/browser/ui/android/website_settings_popup_android.cc
|
| copy to chrome/browser/ui/android/website_settings_popup_legacy_android.cc
|
| index a3b84723612117fb7dd0dc33211928d244f5cca1..d36f3824c9fadb8c98bf4c282efecb68ec74604a 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"
|
| @@ -13,14 +13,14 @@
|
| #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
|
| #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
|
| #include "chrome/browser/ui/website_settings/website_settings.h"
|
| -#include "chrome/grit/generated_resources.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/cert_store.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| #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 "grit/generated_resources.h"
|
| +#include "jni/WebsiteSettingsPopupLegacy_jni.h"
|
| #include "net/cert/x509_certificate.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| @@ -77,10 +77,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) {
|
| @@ -102,13 +102,14 @@ 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) {
|
| @@ -122,7 +123,7 @@ void WebsiteSettingsPopupAndroid::ResetCertDecisions(
|
| delegate->RevokeUserDecisionsHard(presenter_->site_url().host());
|
| }
|
|
|
| -void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| +void WebsiteSettingsPopupLegacyAndroid::SetIdentityInfo(
|
| const IdentityInfo& identity_info) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
|
|
| @@ -140,11 +141,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,
|
| @@ -155,7 +156,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());
|
| @@ -169,39 +170,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);
|
| }
|
|
|