| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 entry->GetSSL() = details.ssl_status; | 120 entry->GetSSL() = details.ssl_status; |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); | 124 policy()->UpdateEntry(entry, controller_->delegate()->GetWebContents()); |
| 125 // Always notify the WebContents that the SSL state changed when a | 125 // Always notify the WebContents that the SSL state changed when a |
| 126 // load is committed, in case the active navigation entry has changed. | 126 // load is committed, in case the active navigation entry has changed. |
| 127 NotifyDidChangeVisibleSSLState(); | 127 NotifyDidChangeVisibleSSLState(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void SSLManager::DidDisplayInsecureContent() { | 130 void SSLManager::DidRunInsecureContent(const GURL& security_origin) { |
| 131 UpdateEntry(controller_->GetLastCommittedEntry()); | |
| 132 } | |
| 133 | |
| 134 void SSLManager::DidRunInsecureContent(const std::string& security_origin) { | |
| 135 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); | 131 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 136 policy()->DidRunInsecureContent(navigation_entry, security_origin); | 132 policy()->DidRunInsecureContent(navigation_entry, security_origin); |
| 137 UpdateEntry(navigation_entry); | 133 UpdateEntry(navigation_entry); |
| 138 } | 134 } |
| 139 | 135 |
| 140 void SSLManager::DidLoadFromMemoryCache( | 136 void SSLManager::DidLoadFromMemoryCache( |
| 141 const LoadFromMemoryCacheDetails& details) { | 137 const LoadFromMemoryCacheDetails& details) { |
| 142 // Simulate loading this resource through the usual path. | 138 // Simulate loading this resource through the usual path. |
| 143 // Note that we specify SUB_RESOURCE as the resource type as WebCore only | 139 // Note that we specify SUB_RESOURCE as the resource type as WebCore only |
| 144 // caches sub-resources. | 140 // caches sub-resources. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 NotifyDidChangeVisibleSSLState(); | 189 NotifyDidChangeVisibleSSLState(); |
| 194 } | 190 } |
| 195 | 191 |
| 196 void SSLManager::NotifyDidChangeVisibleSSLState() { | 192 void SSLManager::NotifyDidChangeVisibleSSLState() { |
| 197 WebContentsImpl* contents = | 193 WebContentsImpl* contents = |
| 198 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 194 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 199 contents->DidChangeVisibleSSLState(); | 195 contents->DidChangeVisibleSSLState(); |
| 200 } | 196 } |
| 201 | 197 |
| 202 } // namespace content | 198 } // namespace content |
| OLD | NEW |