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