| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 674728838d4c7781a32a7ab2893c5970e078514b..d2e038178aef98cd550639618a4392ab8e75fcf9 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -416,10 +416,6 @@ WebContentsImpl::WebContentsImpl(BrowserContext* browser_context)
|
| upload_size_(0),
|
| upload_position_(0),
|
| is_resume_pending_(false),
|
| - displayed_insecure_content_(false),
|
| - displayed_content_with_cert_errors_(false),
|
| - displayed_password_field_on_http_(false),
|
| - displayed_credit_card_field_on_http_(false),
|
| has_accessed_initial_document_(false),
|
| theme_color_(SK_ColorTRANSPARENT),
|
| last_sent_theme_color_(SK_ColorTRANSPARENT),
|
| @@ -2535,22 +2531,6 @@ void WebContentsImpl::ResizeDueToAutoResize(
|
| delegate_->ResizeDueToAutoResize(this, new_size);
|
| }
|
|
|
| -bool WebContentsImpl::DisplayedInsecureContent() const {
|
| - return displayed_insecure_content_;
|
| -}
|
| -
|
| -bool WebContentsImpl::DisplayedContentWithCertErrors() const {
|
| - return displayed_content_with_cert_errors_;
|
| -}
|
| -
|
| -bool WebContentsImpl::DisplayedPasswordFieldOnHttp() const {
|
| - return displayed_password_field_on_http_;
|
| -}
|
| -
|
| -bool WebContentsImpl::DisplayedCreditCardFieldOnHttp() const {
|
| - return displayed_credit_card_field_on_http_;
|
| -}
|
| -
|
| WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) {
|
| if (!delegate_)
|
| return NULL;
|
| @@ -3427,17 +3407,6 @@ void WebContentsImpl::DidNavigateMainFramePostCommit(
|
| theme_color_ = SK_ColorTRANSPARENT;
|
| }
|
|
|
| - if (!details.is_in_page) {
|
| - // Once the main frame is navigated, we're no longer considered to have
|
| - // displayed insecure content.
|
| - displayed_insecure_content_ = false;
|
| - displayed_content_with_cert_errors_ = false;
|
| - displayed_password_field_on_http_ = false;
|
| - displayed_credit_card_field_on_http_ = false;
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| - }
|
| -
|
| // Notify observers about navigation.
|
| FOR_EACH_OBSERVER(WebContentsObserver, observers_,
|
| DidNavigateMainFrame(details, params));
|
| @@ -3522,9 +3491,7 @@ void WebContentsImpl::OnDidLoadResourceFromMemoryCache(
|
|
|
| void WebContentsImpl::OnDidDisplayInsecureContent() {
|
| RecordAction(base::UserMetricsAction("SSL.DisplayedInsecureContent"));
|
| - displayed_insecure_content_ = true;
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| + controller_.ssl_manager()->DidDisplayMixedContent();
|
| }
|
|
|
| void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin,
|
| @@ -3535,16 +3502,12 @@ void WebContentsImpl::OnDidRunInsecureContent(const GURL& security_origin,
|
| if (base::EndsWith(security_origin.spec(), kDotGoogleDotCom,
|
| base::CompareCase::INSENSITIVE_ASCII))
|
| RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle"));
|
| - controller_.ssl_manager()->DidRunInsecureContent(security_origin);
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| + controller_.ssl_manager()->DidRunMixedContent(security_origin);
|
| }
|
|
|
| void WebContentsImpl::OnDidDisplayContentWithCertificateErrors(
|
| const GURL& url) {
|
| - displayed_content_with_cert_errors_ = true;
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| + controller_.ssl_manager()->DidDisplayContentWithCertErrors();
|
| }
|
|
|
| void WebContentsImpl::OnDidRunContentWithCertificateErrors(
|
| @@ -3557,8 +3520,6 @@ void WebContentsImpl::OnDidRunContentWithCertificateErrors(
|
| // about:blank and sandboxed origins. https://crbug.com/609527
|
| controller_.ssl_manager()->DidRunContentWithCertErrors(
|
| entry->GetURL().GetOrigin());
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| }
|
|
|
| void WebContentsImpl::OnDocumentLoadedInFrame() {
|
| @@ -3866,15 +3827,11 @@ void WebContentsImpl::StopMediaSession() {
|
| }
|
|
|
| void WebContentsImpl::OnPasswordInputShownOnHttp() {
|
| - displayed_password_field_on_http_ = true;
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| + controller_.ssl_manager()->DidShowPasswordInputOnHttp();
|
| }
|
|
|
| void WebContentsImpl::OnCreditCardInputShownOnHttp() {
|
| - displayed_credit_card_field_on_http_ = true;
|
| - SSLManager::NotifySSLInternalStateChanged(
|
| - GetController().GetBrowserContext());
|
| + controller_.ssl_manager()->DidShowCreditCardInputOnHttp();
|
| }
|
|
|
| void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() {
|
|
|