diff options
author | estark <estark@chromium.org> | 2015-07-28 13:56:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-28 20:56:51 +0000 |
commit | 5318895a4dd623caf5d152461684935c6e874e12 (patch) | |
tree | 3ad3ae810ea15d3e27d3b7bd463f82798499e42d /content/browser/ssl/ssl_manager.cc | |
parent | 84dff94bdb4c72490263b1dcba295dd2ff6dbc9f (diff) | |
download | chromium_src-5318895a4dd623caf5d152461684935c6e874e12.zip chromium_src-5318895a4dd623caf5d152461684935c6e874e12.tar.gz chromium_src-5318895a4dd623caf5d152461684935c6e874e12.tar.bz2 |
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
Review URL: https://codereview.chromium.org/1244863003
Cr-Commit-Position: refs/heads/master@{#340762}
Diffstat (limited to 'content/browser/ssl/ssl_manager.cc')
-rw-r--r-- | content/browser/ssl/ssl_manager.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc index ab1048c..e4c71e3 100644 --- a/content/browser/ssl/ssl_manager.cc +++ b/content/browser/ssl/ssl_manager.cc @@ -121,7 +121,10 @@ void SSLManager::DidCommitProvisionalLoad(const LoadCommittedDetails& details) { } } - UpdateEntry(entry); + 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(); } void SSLManager::DidDisplayInsecureContent() { @@ -184,12 +187,16 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) { SSLStatus original_ssl_status = entry->GetSSL(); // Copy! - WebContentsImpl* contents = - static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); - policy()->UpdateEntry(entry, contents); + policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); if (!entry->GetSSL().Equals(original_ssl_status)) - contents->DidChangeVisibleSSLState(); + NotifyDidChangeVisibleSSLState(); +} + +void SSLManager::NotifyDidChangeVisibleSSLState() { + WebContentsImpl* contents = + static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); + contents->DidChangeVisibleSSLState(); } } // namespace content |