OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 // Records that |cert| is permitted to be used for |host| in the future, for | 25 // Records that |cert| is permitted to be used for |host| in the future, for |
26 // a specified |error| type. | 26 // a specified |error| type. |
27 virtual void AllowCert(const std::string&, | 27 virtual void AllowCert(const std::string&, |
28 net::X509Certificate* cert, | 28 net::X509Certificate* cert, |
29 net::CertStatus error) = 0; | 29 net::CertStatus error) = 0; |
30 | 30 |
31 // Clear all allow/deny preferences. | 31 // Clear all allow/deny preferences. |
32 virtual void Clear() = 0; | 32 virtual void Clear() = 0; |
33 | 33 |
34 // Queries whether |cert| is allowed or denied for |host| and |error|. | 34 // Queries whether |cert| is allowed or denied for |host| and |error|. Returns |
35 virtual net::CertPolicy::Judgment QueryPolicy(const std::string& host, | 35 // true in |expired_previous_decision| if a previous user decision expired |
36 net::X509Certificate* cert, | 36 // immediately prior to this query, otherwise false. |
37 net::CertStatus error) = 0; | 37 virtual net::CertPolicy::Judgment QueryPolicy( |
| 38 const std::string& host, |
| 39 net::X509Certificate* cert, |
| 40 net::CertStatus error, |
| 41 bool* expired_previous_decision) = 0; |
38 | 42 |
39 // Revoke all allow/deny preferences for |host|. | 43 // Revoke all allow/deny preferences for |host|. |
40 virtual void RevokeAllowAndDenyPreferences(const std::string& host) = 0; | 44 virtual void RevokeAllowAndDenyPreferences(const std::string& host) = 0; |
41 | 45 |
42 // Returns true if any decisions has been recorded for |host|, otherwise | 46 // Returns true if any decisions has been recorded for |host|, otherwise |
43 // false. | 47 // false. |
44 virtual bool HasAllowedOrDeniedCert(const std::string& host) = 0; | 48 virtual bool HasAllowedOrDeniedCert(const std::string& host) = 0; |
45 | 49 |
46 protected: | 50 protected: |
47 virtual ~SSLHostStateDelegate() {} | 51 virtual ~SSLHostStateDelegate() {} |
48 }; | 52 }; |
49 | 53 |
50 } // namespace content | 54 } // namespace content |
51 | 55 |
52 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 56 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
OLD | NEW |