| Index: chrome/browser/ui/android/website_settings_popup_android.cc
|
| diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_android.cc
|
| index c5a35f7b31f7efde788ae280e5bc7917d2a79be4..8ce315363ef20644037cf71caaf6b23f67bb8cf8 100644
|
| --- a/chrome/browser/ui/android/website_settings_popup_android.cc
|
| +++ b/chrome/browser/ui/android/website_settings_popup_android.cc
|
| @@ -10,7 +10,10 @@
|
| #include "chrome/browser/android/resource_mapper.h"
|
| #include "chrome/browser/infobars/infobar_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#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 "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"
|
| @@ -105,6 +108,20 @@ void WebsiteSettingsPopupAndroid::Destroy(JNIEnv* env, jobject obj) {
|
| delete this;
|
| }
|
|
|
| +void WebsiteSettingsPopupAndroid::ResetCertDecisions(
|
| + JNIEnv* env,
|
| + jobject obj,
|
| + jobject java_web_contents) {
|
| + content::WebContents* web_contents =
|
| + content::WebContents::FromJavaWebContents(java_web_contents);
|
| + if (!web_contents)
|
| + return;
|
| + ChromeSSLHostStateDelegate* delegate =
|
| + presenter_->chrome_ssl_host_state_delegate();
|
| + DCHECK(delegate);
|
| + delegate->RevokeUserDecisionsHard(presenter_->site_url().host());
|
| +}
|
| +
|
| void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| const IdentityInfo& identity_info) {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
| @@ -125,8 +142,15 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
|
|
| ScopedJavaLocalRef<jstring> description = ConvertUTF8ToJavaString(
|
| env, identity_info.identity_status_description);
|
| + Java_WebsiteSettingsPopup_addDescriptionSection(
|
| + env,
|
| + popup_jobject_.obj(),
|
| + icon_id,
|
| + ConvertUTF8ToJavaString(env, headline).obj(),
|
| + description.obj());
|
| +
|
| base::string16 certificate_label =
|
| - l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
|
| + l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON);
|
| Java_WebsiteSettingsPopup_addCertificateSection(
|
| env,
|
| popup_jobject_.obj(),
|
| @@ -134,6 +158,15 @@ void WebsiteSettingsPopupAndroid::SetIdentityInfo(
|
| ConvertUTF8ToJavaString(env, headline).obj(),
|
| description.obj(),
|
| ConvertUTF16ToJavaString(env, certificate_label).obj());
|
| +
|
| + 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(
|
| + env,
|
| + popup_jobject_.obj(),
|
| + ConvertUTF16ToJavaString(env, reset_button_label).obj());
|
| + }
|
| }
|
|
|
| {
|
|
|