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_policy_backend.h" | 5 #include "content/browser/ssl/ssl_policy_backend.h" |
6 | 6 |
7 #include "content/browser/ssl/ssl_host_state.h" | 7 #include "content/browser/ssl/ssl_host_state.h" |
8 #include "content/browser/web_contents/navigation_controller_impl.h" | 8 #include "content/browser/web_contents/navigation_controller_impl.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 | 10 |
| 11 using content::NavigationControllerImpl; |
| 12 |
11 SSLPolicyBackend::SSLPolicyBackend(NavigationControllerImpl* controller) | 13 SSLPolicyBackend::SSLPolicyBackend(NavigationControllerImpl* controller) |
12 : ssl_host_state_(SSLHostState::GetFor(controller->GetBrowserContext())), | 14 : ssl_host_state_(SSLHostState::GetFor(controller->GetBrowserContext())), |
13 controller_(controller) { | 15 controller_(controller) { |
14 DCHECK(controller_); | 16 DCHECK(controller_); |
15 } | 17 } |
16 | 18 |
17 void SSLPolicyBackend::HostRanInsecureContent(const std::string& host, int id) { | 19 void SSLPolicyBackend::HostRanInsecureContent(const std::string& host, int id) { |
18 ssl_host_state_->HostRanInsecureContent(host, id); | 20 ssl_host_state_->HostRanInsecureContent(host, id); |
19 SSLManager::NotifySSLInternalStateChanged(controller_); | 21 SSLManager::NotifySSLInternalStateChanged(controller_); |
20 } | 22 } |
(...skipping 10 matching lines...) Expand all Loading... |
31 | 33 |
32 void SSLPolicyBackend::AllowCertForHost(net::X509Certificate* cert, | 34 void SSLPolicyBackend::AllowCertForHost(net::X509Certificate* cert, |
33 const std::string& host) { | 35 const std::string& host) { |
34 ssl_host_state_->AllowCertForHost(cert, host); | 36 ssl_host_state_->AllowCertForHost(cert, host); |
35 } | 37 } |
36 | 38 |
37 net::CertPolicy::Judgment SSLPolicyBackend::QueryPolicy( | 39 net::CertPolicy::Judgment SSLPolicyBackend::QueryPolicy( |
38 net::X509Certificate* cert, const std::string& host) { | 40 net::X509Certificate* cert, const std::string& host) { |
39 return ssl_host_state_->QueryPolicy(cert, host); | 41 return ssl_host_state_->QueryPolicy(cert, host); |
40 } | 42 } |
OLD | NEW |