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..6a29ff2619833c5ccd3bde2ae883f7ec6bbfe22d 100644 |
--- a/chrome/browser/ui/android/website_settings_popup_android.cc |
+++ b/chrome/browser/ui/android/website_settings_popup_android.cc |
@@ -11,9 +11,11 @@ |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/profiles/profile.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" |
+#include "content/public/browser/ssl_host_state_delegate.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/ssl_status.h" |
#include "grit/generated_resources.h" |
@@ -105,6 +107,21 @@ 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; |
+ content::SSLHostStateDelegate* delegate = |
+ web_contents->GetBrowserContext()->GetSSLHostStateDelegate(); |
+ if (!delegate) |
+ return; |
+ 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.have_bypassed_ssl_error) { |
+ 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()); |
+ } |
} |
{ |