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 "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Records that |cert| is permitted to be used for |host| in the future, for | 33 // Records that |cert| is permitted to be used for |host| in the future, for |
34 // a specified |error| type. | 34 // a specified |error| type. |
35 virtual void AllowCert(const std::string&, | 35 virtual void AllowCert(const std::string&, |
36 net::X509Certificate* cert, | 36 net::X509Certificate* cert, |
37 net::CertStatus error) = 0; | 37 net::CertStatus error) = 0; |
38 | 38 |
39 // Clear all allow/deny preferences. | 39 // Clear all allow/deny preferences. |
40 virtual void Clear() = 0; | 40 virtual void Clear() = 0; |
41 | 41 |
42 // Queries whether |cert| is allowed or denied for |host| and |error|. | 42 // Queries whether |cert| is allowed or denied for |host| and |error|. Returns |
43 virtual net::CertPolicy::Judgment QueryPolicy(const std::string& host, | 43 // true in |expired_previous_decision| if a previous user decision expired |
44 net::X509Certificate* cert, | 44 // immediately prior to this query, otherwise false. |
45 net::CertStatus error) = 0; | 45 virtual net::CertPolicy::Judgment QueryPolicy( |
| 46 const std::string& host, |
| 47 net::X509Certificate* cert, |
| 48 net::CertStatus error, |
| 49 bool* expired_previous_decision) = 0; |
46 | 50 |
47 // Records that a host has run insecure content. | 51 // Records that a host has run insecure content. |
48 virtual void HostRanInsecureContent(const std::string& host, int pid) = 0; | 52 virtual void HostRanInsecureContent(const std::string& host, int pid) = 0; |
49 | 53 |
50 // Returns whether the specified host ran insecure content. | 54 // Returns whether the specified host ran insecure content. |
51 virtual bool DidHostRunInsecureContent(const std::string& host, | 55 virtual bool DidHostRunInsecureContent(const std::string& host, |
52 int pid) const = 0; | 56 int pid) const = 0; |
53 | 57 |
54 protected: | 58 protected: |
55 virtual ~SSLHostStateDelegate() {} | 59 virtual ~SSLHostStateDelegate() {} |
56 }; | 60 }; |
57 | 61 |
58 } // namespace content | 62 } // namespace content |
59 | 63 |
60 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ | 64 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ |
OLD | NEW |