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 11 matching lines...) Expand all Loading... |
22 // experimental group, remembers this decision either until end-of-session or | 22 // experimental group, remembers this decision either until end-of-session or |
23 // for a particular length of time. | 23 // for a particular length of time. |
24 class ChromeSSLHostStateDelegate : public content::SSLHostStateDelegate { | 24 class ChromeSSLHostStateDelegate : public content::SSLHostStateDelegate { |
25 public: | 25 public: |
26 explicit ChromeSSLHostStateDelegate(Profile* profile); | 26 explicit ChromeSSLHostStateDelegate(Profile* profile); |
27 virtual ~ChromeSSLHostStateDelegate(); | 27 virtual ~ChromeSSLHostStateDelegate(); |
28 | 28 |
29 // SSLHostStateDelegate: | 29 // SSLHostStateDelegate: |
30 virtual void AllowCert(const std::string& host, | 30 virtual void AllowCert(const std::string& host, |
31 const net::X509Certificate& cert, | 31 const net::X509Certificate& cert, |
32 net::CertStatus error) OVERRIDE; | 32 net::CertStatus error) override; |
33 virtual void Clear() OVERRIDE; | 33 virtual void Clear() override; |
34 virtual CertJudgment QueryPolicy(const std::string& host, | 34 virtual CertJudgment QueryPolicy(const std::string& host, |
35 const net::X509Certificate& cert, | 35 const net::X509Certificate& cert, |
36 net::CertStatus error, | 36 net::CertStatus error, |
37 bool* expired_previous_decision) OVERRIDE; | 37 bool* expired_previous_decision) override; |
38 virtual void HostRanInsecureContent(const std::string& host, | 38 virtual void HostRanInsecureContent(const std::string& host, |
39 int pid) OVERRIDE; | 39 int pid) override; |
40 virtual bool DidHostRunInsecureContent(const std::string& host, | 40 virtual bool DidHostRunInsecureContent(const std::string& host, |
41 int pid) const OVERRIDE; | 41 int pid) const override; |
42 | 42 |
43 // Revokes all SSL certificate error allow exceptions made by the user for | 43 // Revokes all SSL certificate error allow exceptions made by the user for |
44 // |host| in the given Profile. | 44 // |host| in the given Profile. |
45 virtual void RevokeUserAllowExceptions(const std::string& host); | 45 virtual void RevokeUserAllowExceptions(const std::string& host); |
46 | 46 |
47 // RevokeUserAllowExceptionsHard is the same as RevokeUserAllowExceptions but | 47 // RevokeUserAllowExceptionsHard is the same as RevokeUserAllowExceptions but |
48 // additionally may close idle connections in the process. This should be used | 48 // additionally may close idle connections in the process. This should be used |
49 // *only* for rare events, such as a user controlled button, as it may be very | 49 // *only* for rare events, such as a user controlled button, as it may be very |
50 // disruptive to the networking stack. | 50 // disruptive to the networking stack. |
51 virtual void RevokeUserAllowExceptionsHard(const std::string& host); | 51 virtual void RevokeUserAllowExceptionsHard(const std::string& host); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // should be removed after the experiment has finished, and a call to Clear() | 137 // should be removed after the experiment has finished, and a call to Clear() |
138 // should be added to the constructor and destructor for members of the | 138 // should be added to the constructor and destructor for members of the |
139 // FORGET_SSL_EXCEPTION_DECISIONS_AT_SESSION_END groups. See | 139 // FORGET_SSL_EXCEPTION_DECISIONS_AT_SESSION_END groups. See |
140 // https://crbug.com/418631 for more details. | 140 // https://crbug.com/418631 for more details. |
141 const std::string current_expiration_guid_; | 141 const std::string current_expiration_guid_; |
142 | 142 |
143 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate); | 143 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate); |
144 }; | 144 }; |
145 | 145 |
146 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ | 146 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ |
OLD | NEW |