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 #ifndef CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ |
6 #define CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 void DenyCertForHost(net::X509Certificate* cert, | 32 void DenyCertForHost(net::X509Certificate* cert, |
33 const std::string& host, | 33 const std::string& host, |
34 net::CertStatus error); | 34 net::CertStatus error); |
35 | 35 |
36 // Records that |cert| is permitted to be used for |host| in the future, for | 36 // Records that |cert| is permitted to be used for |host| in the future, for |
37 // a specific error type. | 37 // a specific error type. |
38 void AllowCertForHost(net::X509Certificate* cert, | 38 void AllowCertForHost(net::X509Certificate* cert, |
39 const std::string& host, | 39 const std::string& host, |
40 net::CertStatus error); | 40 net::CertStatus error); |
41 | 41 |
42 // Queries whether |cert| is allowed or denied for |host|. | 42 // Queries whether |cert| is allowed or denied for |host|. Returns true in |
| 43 // |expired_previous_decision| if a user decision had been made previously but |
| 44 // that decision has expired, otherwise false. |
43 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert, | 45 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert, |
44 const std::string& host, | 46 const std::string& host, |
45 net::CertStatus error); | 47 net::CertStatus error, |
| 48 bool* expired_previous_decision); |
46 | 49 |
47 private: | 50 private: |
48 // SSL state specific for each host. | 51 // SSL state specific for each host. |
49 SSLHostState* ssl_host_state_; | 52 SSLHostState* ssl_host_state_; |
50 | 53 |
51 NavigationControllerImpl* controller_; | 54 NavigationControllerImpl* controller_; |
52 | 55 |
53 DISALLOW_COPY_AND_ASSIGN(SSLPolicyBackend); | 56 DISALLOW_COPY_AND_ASSIGN(SSLPolicyBackend); |
54 }; | 57 }; |
55 | 58 |
56 } // namespace content | 59 } // namespace content |
57 | 60 |
58 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ | 61 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ |
OLD | NEW |