Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: chrome/browser/ssl/chrome_ssl_host_state_delegate.h

Issue 1058003004: Forget SSL error exceptions when good certs seen for regular requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Yet Another Webview Fix (should be the last, I swear) Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
34 CertJudgment QueryPolicy(const std::string& host, 34 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 void HostRanInsecureContent(const std::string& host, int pid) override; 38 void HostRanInsecureContent(const std::string& host, int pid) override;
39 bool DidHostRunInsecureContent(const std::string& host, 39 bool DidHostRunInsecureContent(const std::string& host,
40 int pid) const override; 40 int pid) const override;
41 41
42 // Revokes all SSL certificate error allow exceptions made by the user for 42 // Revokes all SSL certificate error allow exceptions made by the user for
43 // |host| in the given Profile. 43 // |host| in the given Profile.
44 virtual void RevokeUserAllowExceptions(const std::string& host); 44 void RevokeUserAllowExceptions(const std::string& host) override;
45 45
46 // RevokeUserAllowExceptionsHard is the same as RevokeUserAllowExceptions but 46 // RevokeUserAllowExceptionsHard is the same as RevokeUserAllowExceptions but
47 // additionally may close idle connections in the process. This should be used 47 // additionally may close idle connections in the process. This should be used
48 // *only* for rare events, such as a user controlled button, as it may be very 48 // *only* for rare events, such as a user controlled button, as it may be very
49 // disruptive to the networking stack. 49 // disruptive to the networking stack.
50 virtual void RevokeUserAllowExceptionsHard(const std::string& host); 50 virtual void RevokeUserAllowExceptionsHard(const std::string& host);
51 51
52 // Returns whether the user has allowed a certificate error exception for 52 // Returns whether the user has allowed a certificate error exception for
53 // |host|. This does not mean that *all* certificate errors are allowed, just 53 // |host|. This does not mean that *all* certificate errors are allowed, just
54 // that there exists an exception. To see if a particular certificate and 54 // that there exists an exception. To see if a particular certificate and
55 // error combination exception is allowed, use QueryPolicy(). 55 // error combination exception is allowed, use QueryPolicy().
56 virtual bool HasAllowException(const std::string& host) const; 56 bool HasAllowException(const std::string& host) const override;
57 57
58 protected: 58 protected:
59 // SetClock takes ownership of the passed in clock. 59 // SetClock takes ownership of the passed in clock.
60 void SetClock(scoped_ptr<base::Clock> clock); 60 void SetClock(scoped_ptr<base::Clock> clock);
61 61
62 private: 62 private:
63 FRIEND_TEST_ALL_PREFIXES(ForgetInstantlySSLHostStateDelegateTest, 63 FRIEND_TEST_ALL_PREFIXES(ForgetInstantlySSLHostStateDelegateTest,
64 MakeAndForgetException); 64 MakeAndForgetException);
65 FRIEND_TEST_ALL_PREFIXES(RememberSSLHostStateDelegateTest, AfterRestart); 65 FRIEND_TEST_ALL_PREFIXES(RememberSSLHostStateDelegateTest, AfterRestart);
66 FRIEND_TEST_ALL_PREFIXES(RememberSSLHostStateDelegateTest, 66 FRIEND_TEST_ALL_PREFIXES(RememberSSLHostStateDelegateTest,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // should be removed after the experiment has finished, and a call to Clear() 136 // should be removed after the experiment has finished, and a call to Clear()
137 // should be added to the constructor and destructor for members of the 137 // should be added to the constructor and destructor for members of the
138 // FORGET_SSL_EXCEPTION_DECISIONS_AT_SESSION_END groups. See 138 // FORGET_SSL_EXCEPTION_DECISIONS_AT_SESSION_END groups. See
139 // https://crbug.com/418631 for more details. 139 // https://crbug.com/418631 for more details.
140 const std::string current_expiration_guid_; 140 const std::string current_expiration_guid_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate); 142 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDelegate);
143 }; 143 };
144 144
145 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_ 145 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « android_webview/browser/aw_ssl_host_state_delegate.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698