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 CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ |
6 #define CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ | 6 #define CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual void DenyCert(const std::string& host, | 31 virtual void DenyCert(const std::string& host, |
32 net::X509Certificate* cert, | 32 net::X509Certificate* cert, |
33 net::CertStatus error) OVERRIDE; | 33 net::CertStatus error) OVERRIDE; |
34 virtual void AllowCert(const std::string& host, | 34 virtual void AllowCert(const std::string& host, |
35 net::X509Certificate* cert, | 35 net::X509Certificate* cert, |
36 net::CertStatus error) OVERRIDE; | 36 net::CertStatus error) OVERRIDE; |
37 virtual void Clear() OVERRIDE; | 37 virtual void Clear() OVERRIDE; |
38 virtual net::CertPolicy::Judgment QueryPolicy(const std::string& host, | 38 virtual net::CertPolicy::Judgment QueryPolicy(const std::string& host, |
39 net::X509Certificate* cert, | 39 net::X509Certificate* cert, |
40 net::CertStatus error) OVERRIDE; | 40 net::CertStatus error) OVERRIDE; |
41 virtual void RevokeAllowAndDenyPreferences(const std::string& host) OVERRIDE; | 41 virtual void RevokeUserDecisions(const std::string& host) OVERRIDE; |
42 virtual bool HasAllowedOrDeniedCert(const std::string& host) OVERRIDE; | 42 virtual void RevokeUserDecisionsHard(const std::string& host) OVERRIDE; |
| 43 virtual bool HasUserDecision(const std::string& host) OVERRIDE; |
| 44 |
| 45 virtual void HostRanInsecureContent(const std::string& host, |
| 46 int pid) OVERRIDE; |
| 47 virtual bool DidHostRunInsecureContent(const std::string& host, |
| 48 int pid) const OVERRIDE; |
43 | 49 |
44 // Called on the UI thread when the profile is about to be destroyed. | 50 // Called on the UI thread when the profile is about to be destroyed. |
45 void ShutdownOnUIThread() {} | 51 void ShutdownOnUIThread() {} |
46 | 52 |
47 protected: | 53 protected: |
48 // SetClock takes ownership of the passed in clock. | 54 // SetClock takes ownership of the passed in clock. |
49 void SetClock(scoped_ptr<base::Clock> clock); | 55 void SetClock(scoped_ptr<base::Clock> clock); |
50 | 56 |
51 private: | 57 private: |
52 FRIEND_TEST_ALL_PREFIXES(ForgetInstantlySSLHostStateDelegateTest, | 58 FRIEND_TEST_ALL_PREFIXES(ForgetInstantlySSLHostStateDelegateTest, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // NULL if they do not exist. | 99 // NULL if they do not exist. |
94 base::DictionaryValue* GetValidCertDecisionsDict( | 100 base::DictionaryValue* GetValidCertDecisionsDict( |
95 base::DictionaryValue* dict, | 101 base::DictionaryValue* dict, |
96 CreateDictionaryEntriesDisposition create_entries); | 102 CreateDictionaryEntriesDisposition create_entries); |
97 | 103 |
98 scoped_ptr<base::Clock> clock_; | 104 scoped_ptr<base::Clock> clock_; |
99 RememberSSLExceptionDecisionsDisposition should_remember_ssl_decisions_; | 105 RememberSSLExceptionDecisionsDisposition should_remember_ssl_decisions_; |
100 base::TimeDelta default_ssl_cert_decision_expiration_delta_; | 106 base::TimeDelta default_ssl_cert_decision_expiration_delta_; |
101 Profile* profile_; | 107 Profile* profile_; |
102 | 108 |
| 109 // A BrokenHostEntry is a pair of (host, process_id) that indicates the host |
| 110 // contains insecure content in that renderer process. |
| 111 typedef std::pair<std::string, int> BrokenHostEntry; |
| 112 |
| 113 // Hosts which have been contaminated with insecure content in the |
| 114 // specified process. Note that insecure content can travel between |
| 115 // same-origin frames in one processs but cannot jump between processes. |
| 116 std::set<BrokenHostEntry> ran_insecure_content_hosts_; |
| 117 |
103 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate); | 118 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate); |
104 }; | 119 }; |
105 | 120 |
106 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ | 121 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ |
OLD | NEW |