| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::DidRunInsecureContent(const GURL& security_origin) { |
| 138 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); | 138 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 139 policy()->DidRunInsecureContent(navigation_entry, security_origin); | 139 policy()->DidRunInsecureContent(navigation_entry, security_origin); |
| 140 UpdateEntry(navigation_entry); | 140 UpdateEntry(navigation_entry); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void SSLManager::DidRunContentWithCertErrors(const GURL& security_origin) { |
| 144 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 145 policy()->DidRunContentWithCertErrors(navigation_entry, security_origin); |
| 146 UpdateEntry(navigation_entry); |
| 147 } |
| 148 |
| 143 void SSLManager::DidLoadFromMemoryCache( | 149 void SSLManager::DidLoadFromMemoryCache( |
| 144 const LoadFromMemoryCacheDetails& details) { | 150 const LoadFromMemoryCacheDetails& details) { |
| 145 // Simulate loading this resource through the usual path. | 151 // Simulate loading this resource through the usual path. |
| 146 policy()->OnRequestStarted(details.url, details.cert_id, details.cert_status); | 152 policy()->OnRequestStarted(details.url, details.cert_id, details.cert_status); |
| 147 } | 153 } |
| 148 | 154 |
| 149 void SSLManager::DidStartResourceResponse( | 155 void SSLManager::DidStartResourceResponse( |
| 150 const ResourceRequestDetails& details) { | 156 const ResourceRequestDetails& details) { |
| 151 // Notify our policy that we started a resource request. Ideally, the | 157 // Notify our policy that we started a resource request. Ideally, the |
| 152 // policy should have the ability to cancel the request, but we can't do | 158 // policy should have the ability to cancel the request, but we can't do |
| (...skipping 25 matching lines...) Expand all Loading... |
| 178 NotifyDidChangeVisibleSSLState(); | 184 NotifyDidChangeVisibleSSLState(); |
| 179 } | 185 } |
| 180 | 186 |
| 181 void SSLManager::NotifyDidChangeVisibleSSLState() { | 187 void SSLManager::NotifyDidChangeVisibleSSLState() { |
| 182 WebContentsImpl* contents = | 188 WebContentsImpl* contents = |
| 183 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 189 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
| 184 contents->DidChangeVisibleSSLState(); | 190 contents->DidChangeVisibleSSLState(); |
| 185 } | 191 } |
| 186 | 192 |
| 187 } // namespace content | 193 } // namespace content |
| OLD | NEW |