| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/ssl/ssl_manager.h" | 5 #include "content/browser/ssl/ssl_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 entry->GetSSL() = details.ssl_status; | 127 entry->GetSSL() = details.ssl_status; |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); | 131 policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); |
| 132 // Always notify the WebContents that the SSL state changed when a | 132 // Always notify the WebContents that the SSL state changed when a |
| 133 // load is committed, in case the active navigation entry has changed. | 133 // load is committed, in case the active navigation entry has changed. |
| 134 NotifyDidChangeVisibleSSLState(); | 134 NotifyDidChangeVisibleSSLState(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SSLManager::DidRunInsecureContent(const GURL& security_origin) { | 137 void SSLManager::DidDisplayInsecureContent() { |
| 138 UpdateEntry(controller_->GetLastCommittedEntry()); |
| 139 } |
| 140 |
| 141 void SSLManager::DidRunInsecureContent(const std::string& security_origin) { |
| 138 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); | 142 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 139 policy()->DidRunInsecureContent(navigation_entry, security_origin); | 143 policy()->DidRunInsecureContent(navigation_entry, security_origin); |
| 140 UpdateEntry(navigation_entry); | 144 UpdateEntry(navigation_entry); |
| 141 } | 145 } |
| 142 | 146 |
| 143 void SSLManager::DidLoadFromMemoryCache( | 147 void SSLManager::DidLoadFromMemoryCache( |
| 144 const LoadFromMemoryCacheDetails& details) { | 148 const LoadFromMemoryCacheDetails& details) { |
| 145 // Simulate loading this resource through the usual path. | 149 // Simulate loading this resource through the usual path. |
| 146 // Note that we specify SUB_RESOURCE as the resource type as WebCore only | 150 // Note that we specify SUB_RESOURCE as the resource type as WebCore only |
| 147 // caches sub-resources. | 151 // caches sub-resources. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 NotifyDidChangeVisibleSSLState(); | 200 NotifyDidChangeVisibleSSLState(); |
| 197 } | 201 } |
| 198 | 202 |
| 199 void SSLManager::NotifyDidChangeVisibleSSLState() { | 203 void SSLManager::NotifyDidChangeVisibleSSLState() { |
| 200 WebContentsImpl* contents = | 204 WebContentsImpl* contents = |
| 201 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 205 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 202 contents->DidChangeVisibleSSLState(); | 206 contents->DidChangeVisibleSSLState(); |
| 203 } | 207 } |
| 204 | 208 |
| 205 } // namespace content | 209 } // namespace content |
| OLD | NEW |