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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // load is committed, in case the active navigation entry has changed. | 159 // load is committed, in case the active navigation entry has changed. |
160 NotifyDidChangeVisibleSSLState(); | 160 NotifyDidChangeVisibleSSLState(); |
161 } | 161 } |
162 | 162 |
163 void SSLManager::DidRunInsecureContent(const GURL& security_origin) { | 163 void SSLManager::DidRunInsecureContent(const GURL& security_origin) { |
164 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); | 164 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
165 policy()->DidRunInsecureContent(navigation_entry, security_origin); | 165 policy()->DidRunInsecureContent(navigation_entry, security_origin); |
166 UpdateEntry(navigation_entry); | 166 UpdateEntry(navigation_entry); |
167 } | 167 } |
168 | 168 |
| 169 void SSLManager::DidRunContentWithCertErrors(const GURL& security_origin) { |
| 170 NavigationEntryImpl* navigation_entry = controller_->GetLastCommittedEntry(); |
| 171 policy()->DidRunContentWithCertErrors(navigation_entry, security_origin); |
| 172 UpdateEntry(navigation_entry); |
| 173 } |
| 174 |
169 void SSLManager::DidStartResourceResponse( | 175 void SSLManager::DidStartResourceResponse( |
170 const ResourceRequestDetails& details) { | 176 const ResourceRequestDetails& details) { |
171 // Notify our policy that we started a resource request. Ideally, the | 177 // Notify our policy that we started a resource request. Ideally, the |
172 // policy should have the ability to cancel the request, but we can't do | 178 // policy should have the ability to cancel the request, but we can't do |
173 // that yet. | 179 // that yet. |
174 policy()->OnRequestStarted(details.url, details.ssl_cert_id, | 180 policy()->OnRequestStarted(details.url, details.ssl_cert_id, |
175 details.ssl_cert_status); | 181 details.ssl_cert_status); |
176 } | 182 } |
177 | 183 |
178 void SSLManager::DidReceiveResourceRedirect( | 184 void SSLManager::DidReceiveResourceRedirect( |
(...skipping 19 matching lines...) Expand all Loading... |
198 NotifyDidChangeVisibleSSLState(); | 204 NotifyDidChangeVisibleSSLState(); |
199 } | 205 } |
200 | 206 |
201 void SSLManager::NotifyDidChangeVisibleSSLState() { | 207 void SSLManager::NotifyDidChangeVisibleSSLState() { |
202 WebContentsImpl* contents = | 208 WebContentsImpl* contents = |
203 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); | 209 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); |
204 contents->DidChangeVisibleSSLState(); | 210 contents->DidChangeVisibleSSLState(); |
205 } | 211 } |
206 | 212 |
207 } // namespace content | 213 } // namespace content |
OLD | NEW |