From 0c388aaf008fe3549e436fdfa3b2d2ee95b9a011 Mon Sep 17 00:00:00 2001 From: estark Date: Tue, 28 Jul 2015 15:42:46 -0700 Subject: Revert of Attach a SecurityStyle to each request in ResourceLoader (patchset #9 id:160001 of https://codereview.chromium.org/1244863003/) Reason for revert: SecurityStyleChanged browser test is flaky after this change: http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests Original issue's description: > Attach a SecurityStyle to each request in ResourceLoader > > This CL adds a SecurityStyle to the serialized security information that > is sent with each request from the browser to the renderer. The > SecurityStyle describes the individual resource, not any bigger-picture > concerns like mixed content. The per-request SecurityStyle will be > displayed in DevTools to help developers diagnose SSL issues on > subresources. > > BUG=502118, 445234 > > Committed: https://crrev.com/5318895a4dd623caf5d152461684935c6e874e12 > Cr-Commit-Position: refs/heads/master@{#340762} TBR=creis@chromium.org,davidben@chromium.org,palmer@chromium.org,msw@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=502118, 445234 Review URL: https://codereview.chromium.org/1259253009 Cr-Commit-Position: refs/heads/master@{#340785} --- content/browser/ssl/ssl_manager.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'content/browser/ssl/ssl_manager.cc') diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc index e4c71e3..ab1048c 100644 --- a/content/browser/ssl/ssl_manager.cc +++ b/content/browser/ssl/ssl_manager.cc @@ -121,10 +121,7 @@ void SSLManager::DidCommitProvisionalLoad(const LoadCommittedDetails& details) { } } - policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); - // Always notify the WebContents that the SSL state changed when a - // load is committed, in case the active navigation entry has changed. - NotifyDidChangeVisibleSSLState(); + UpdateEntry(entry); } void SSLManager::DidDisplayInsecureContent() { @@ -187,16 +184,12 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) { SSLStatus original_ssl_status = entry->GetSSL(); // Copy! - policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); - - if (!entry->GetSSL().Equals(original_ssl_status)) - NotifyDidChangeVisibleSSLState(); -} - -void SSLManager::NotifyDidChangeVisibleSSLState() { WebContentsImpl* contents = static_cast(controller_->delegate()->GetWebContents()); - contents->DidChangeVisibleSSLState(); + policy()->UpdateEntry(entry, contents); + + if (!entry->GetSSL().Equals(original_ssl_status)) + contents->DidChangeVisibleSSLState(); } } // namespace content -- cgit v1.1