OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/test/mock_ssl_host_state_delegate.h" | 5 #include "content/test/mock_ssl_host_state_delegate.h" |
6 | 6 |
7 namespace content { | 7 namespace content { |
8 | 8 |
9 MockSSLHostStateDelegate::MockSSLHostStateDelegate() {} | 9 MockSSLHostStateDelegate::MockSSLHostStateDelegate() {} |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 const std::string& host, | 24 const std::string& host, |
25 const net::X509Certificate& cert, | 25 const net::X509Certificate& cert, |
26 net::CertStatus error, | 26 net::CertStatus error, |
27 bool* expired_previous_decision) { | 27 bool* expired_previous_decision) { |
28 if (exceptions_.find(host) == exceptions_.end()) | 28 if (exceptions_.find(host) == exceptions_.end()) |
29 return SSLHostStateDelegate::DENIED; | 29 return SSLHostStateDelegate::DENIED; |
30 | 30 |
31 return SSLHostStateDelegate::ALLOWED; | 31 return SSLHostStateDelegate::ALLOWED; |
32 } | 32 } |
33 | 33 |
34 void MockSSLHostStateDelegate::HostRanInsecureContent(const std::string& host, | 34 void MockSSLHostStateDelegate::HostRanInsecureContent( |
35 int pid) {} | 35 const std::string& host, |
| 36 int pid, |
| 37 InsecureContentType content_type) {} |
36 | 38 |
37 bool MockSSLHostStateDelegate::DidHostRunInsecureContent( | 39 bool MockSSLHostStateDelegate::DidHostRunInsecureContent( |
38 const std::string& host, | 40 const std::string& host, |
39 int pid) const { | 41 int pid, |
| 42 InsecureContentType content_type) const { |
40 return false; | 43 return false; |
41 } | 44 } |
42 | 45 |
43 void MockSSLHostStateDelegate::RevokeUserAllowExceptions( | 46 void MockSSLHostStateDelegate::RevokeUserAllowExceptions( |
44 const std::string& host) { | 47 const std::string& host) { |
45 exceptions_.erase(exceptions_.find(host)); | 48 exceptions_.erase(exceptions_.find(host)); |
46 } | 49 } |
47 | 50 |
48 bool MockSSLHostStateDelegate::HasAllowException( | 51 bool MockSSLHostStateDelegate::HasAllowException( |
49 const std::string& host) const { | 52 const std::string& host) const { |
50 return exceptions_.find(host) != exceptions_.end(); | 53 return exceptions_.find(host) != exceptions_.end(); |
51 } | 54 } |
52 | 55 |
53 } // namespace content | 56 } // namespace content |
OLD | NEW |