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_HOST_STATE_H_ | 5 #ifndef CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ |
6 #define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ | 6 #define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 void RevokeAllowAndDenyPreferences(const std::string& host); | 63 void RevokeAllowAndDenyPreferences(const std::string& host); |
64 | 64 |
65 bool HasAllowedOrDeniedCert(const std::string& host); | 65 bool HasAllowedOrDeniedCert(const std::string& host); |
66 | 66 |
67 // Clear all allow/deny preferences. | 67 // Clear all allow/deny preferences. |
68 void Clear(); | 68 void Clear(); |
69 | 69 |
70 // Queries whether |cert| is allowed or denied for |url| and |error|. | 70 // Queries whether |cert| is allowed or denied for |url| and |error|. |
71 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert, | 71 net::CertPolicy::Judgment QueryPolicy(net::X509Certificate* cert, |
72 const std::string& host, | 72 const std::string& host, |
73 net::CertStatus error); | 73 net::CertStatus error, |
| 74 bool* expired_previous_decision); |
74 | 75 |
75 private: | 76 private: |
76 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host | 77 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host |
77 // contains insecure content in that renderer process. | 78 // contains insecure content in that renderer process. |
78 typedef std::pair<std::string, int> BrokenHostEntry; | 79 typedef std::pair<std::string, int> BrokenHostEntry; |
79 | 80 |
80 // Hosts which have been contaminated with insecure content in the | 81 // Hosts which have been contaminated with insecure content in the |
81 // specified process. Note that insecure content can travel between | 82 // specified process. Note that insecure content can travel between |
82 // same-origin frames in one processs but cannot jump between processes. | 83 // same-origin frames in one processs but cannot jump between processes. |
83 std::set<BrokenHostEntry> ran_insecure_content_hosts_; | 84 std::set<BrokenHostEntry> ran_insecure_content_hosts_; |
84 | 85 |
85 // The certificate decision store. It may be NULL, depending on the browsing | 86 // The certificate decision store. It may be NULL, depending on the browsing |
86 // context. This is owned by the browsing context. | 87 // context. This is owned by the browsing context. |
87 SSLHostStateDelegate* delegate_; | 88 SSLHostStateDelegate* delegate_; |
88 | 89 |
89 DISALLOW_COPY_AND_ASSIGN(SSLHostState); | 90 DISALLOW_COPY_AND_ASSIGN(SSLHostState); |
90 }; | 91 }; |
91 | 92 |
92 } // namespace content | 93 } // namespace content |
93 | 94 |
94 #endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ | 95 #endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ |
OLD | NEW |