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 #ifndef CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ |
7 | 7 |
8 #include "content/public/browser/ssl_host_state_delegate.h" | 8 #include "content/public/browser/ssl_host_state_delegate.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 class MockSSLHostStateDelegate : public SSLHostStateDelegate { | 12 class MockSSLHostStateDelegate : public SSLHostStateDelegate { |
13 public: | 13 public: |
14 MockSSLHostStateDelegate(); | 14 MockSSLHostStateDelegate(); |
15 ~MockSSLHostStateDelegate() override; | 15 ~MockSSLHostStateDelegate() override; |
16 | 16 |
17 void AllowCert(const std::string& host, | 17 void AllowCert(const std::string& host, |
18 const net::X509Certificate& cert, | 18 const net::X509Certificate& cert, |
19 net::CertStatus error) override; | 19 net::CertStatus error) override; |
20 | 20 |
21 void Clear() override; | 21 void Clear() override; |
22 | 22 |
23 CertJudgment QueryPolicy(const std::string& host, | 23 CertJudgment QueryPolicy(const std::string& host, |
24 const net::X509Certificate& cert, | 24 const net::X509Certificate& cert, |
25 net::CertStatus error, | 25 net::CertStatus error, |
26 bool* expired_previous_decision) override; | 26 bool* expired_previous_decision) override; |
27 | 27 |
28 void HostRanInsecureContent(const std::string& host, int pid) override; | 28 void HostRanInsecureContent(const std::string& host, |
| 29 int pid, |
| 30 InsecureContentType content_type) override; |
29 | 31 |
30 bool DidHostRunInsecureContent(const std::string& host, | 32 bool DidHostRunInsecureContent( |
31 int pid) const override; | 33 const std::string& host, |
| 34 int pid, |
| 35 InsecureContentType content_type) const override; |
32 | 36 |
33 void RevokeUserAllowExceptions(const std::string& host) override; | 37 void RevokeUserAllowExceptions(const std::string& host) override; |
34 | 38 |
35 bool HasAllowException(const std::string& host) const override; | 39 bool HasAllowException(const std::string& host) const override; |
36 | 40 |
37 private: | 41 private: |
38 std::set<std::string> exceptions_; | 42 std::set<std::string> exceptions_; |
39 }; | 43 }; |
40 | 44 |
41 } // namespace content | 45 } // namespace content |
42 | 46 |
43 #endif // CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ | 47 #endif // CONTENT_PUBLIC_TEST_MOCK_SSL_HOST_STATE_DELEGATE_H_ |
OLD | NEW |