| 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/frame_host/navigation_controller_impl.h" | 7 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 8 #include "content/public/browser/browser_context.h" | 8 #include "content/public/browser/browser_context.h" |
| 9 #include "content/public/browser/ssl_host_state_delegate.h" | 9 #include "content/public/browser/ssl_host_state_delegate.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 bool SSLPolicyBackend::DidHostRunInsecureContent(const std::string& host, | 26 bool SSLPolicyBackend::DidHostRunInsecureContent(const std::string& host, |
| 27 int pid) const { | 27 int pid) const { |
| 28 if (!ssl_host_state_delegate_) | 28 if (!ssl_host_state_delegate_) |
| 29 return false; | 29 return false; |
| 30 | 30 |
| 31 return ssl_host_state_delegate_->DidHostRunInsecureContent(host, pid); | 31 return ssl_host_state_delegate_->DidHostRunInsecureContent(host, pid); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void SSLPolicyBackend::HostRanContentWithCertificateErrors( |
| 35 const std::string& host, |
| 36 int id) { |
| 37 if (ssl_host_state_delegate_) |
| 38 ssl_host_state_delegate_->HostRanContentWithCertificateErrors(host, id); |
| 39 SSLManager::NotifySSLInternalStateChanged(controller_->GetBrowserContext()); |
| 40 } |
| 41 |
| 42 bool SSLPolicyBackend::DidHostRunContentWithCertificateErrors( |
| 43 const std::string& host, |
| 44 int pid) const { |
| 45 if (!ssl_host_state_delegate_) |
| 46 return false; |
| 47 |
| 48 return ssl_host_state_delegate_->DidHostRunContentWithCertificateErrors(host, |
| 49 pid); |
| 50 } |
| 51 |
| 34 void SSLPolicyBackend::RevokeUserAllowExceptions(const std::string& host) { | 52 void SSLPolicyBackend::RevokeUserAllowExceptions(const std::string& host) { |
| 35 if (!ssl_host_state_delegate_) | 53 if (!ssl_host_state_delegate_) |
| 36 return; | 54 return; |
| 37 | 55 |
| 38 ssl_host_state_delegate_->RevokeUserAllowExceptions(host); | 56 ssl_host_state_delegate_->RevokeUserAllowExceptions(host); |
| 39 } | 57 } |
| 40 | 58 |
| 41 bool SSLPolicyBackend::HasAllowException(const std::string& host) { | 59 bool SSLPolicyBackend::HasAllowException(const std::string& host) { |
| 42 if (!ssl_host_state_delegate_) | 60 if (!ssl_host_state_delegate_) |
| 43 return false; | 61 return false; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 57 const std::string& host, | 75 const std::string& host, |
| 58 net::CertStatus error, | 76 net::CertStatus error, |
| 59 bool* expired_previous_decision) { | 77 bool* expired_previous_decision) { |
| 60 return ssl_host_state_delegate_ ? | 78 return ssl_host_state_delegate_ ? |
| 61 ssl_host_state_delegate_->QueryPolicy( | 79 ssl_host_state_delegate_->QueryPolicy( |
| 62 host, cert, error, expired_previous_decision) : | 80 host, cert, error, expired_previous_decision) : |
| 63 SSLHostStateDelegate::DENIED; | 81 SSLHostStateDelegate::DENIED; |
| 64 } | 82 } |
| 65 | 83 |
| 66 } // namespace content | 84 } // namespace content |
| OLD | NEW |