| 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::DidDisplayInsecureContent() { | 137 void SSLManager::DidRunInsecureContent(const GURL& security_origin) { |
| 138 UpdateEntry(controller_->GetLastCommittedEntry()); | |
| 139 } | |
| 140 | |
| 141 void SSLManager::DidRunInsecureContent(const std::string& security_origin) { | |
| 142 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); | 138 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 143 policy()->DidRunInsecureContent(navigation_entry, security_origin); | 139 policy()->DidRunInsecureContent(navigation_entry, security_origin); |
| 144 UpdateEntry(navigation_entry); | 140 UpdateEntry(navigation_entry); |
| 145 } | 141 } |
| 146 | 142 |
| 147 void SSLManager::DidLoadFromMemoryCache( | 143 void SSLManager::DidLoadFromMemoryCache( |
| 148 const LoadFromMemoryCacheDetails& details) { | 144 const LoadFromMemoryCacheDetails& details) { |
| 149 // Simulate loading this resource through the usual path. | 145 // Simulate loading this resource through the usual path. |
| 150 // Note that we specify SUB_RESOURCE as the resource type as WebCore only | 146 // Note that we specify SUB_RESOURCE as the resource type as WebCore only |
| 151 // caches sub-resources. | 147 // caches sub-resources. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 NotifyDidChangeVisibleSSLState(); | 196 NotifyDidChangeVisibleSSLState(); |
| 201 } | 197 } |
| 202 | 198 |
| 203 void SSLManager::NotifyDidChangeVisibleSSLState() { | 199 void SSLManager::NotifyDidChangeVisibleSSLState() { |
| 204 WebContentsImpl* contents = | 200 WebContentsImpl* contents = |
| 205 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 201 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 206 contents->DidChangeVisibleSSLState(); | 202 contents->DidChangeVisibleSSLState(); |
| 207 } | 203 } |
| 208 | 204 |
| 209 } // namespace content | 205 } // namespace content |
| OLD | NEW |