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

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

Issue 369703002: Remember user decisions on invalid certificates behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from felt plus new incognito browser tests Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DECISIONS_H_
6 #define CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DECISIONS_H_
7
8 #include "base/time/clock.h"
9 #include "content/public/browser/ssl_host_state_decisions.h"
10
11 class GURL;
12 class Profile;
13
14 namespace base {
15
16 class DictionaryValue;
17
18 } // namespace base
19
20 class ChromeSSLHostStateDecisions : public content::SSLHostStateDecisions {
Ryan Sleevi 2014/07/08 23:53:28 Document
jww 2014/07/11 00:08:41 Done.
21 public:
22 explicit ChromeSSLHostStateDecisions(Profile* profile);
23
24 // SSLHostStateDecisions:
25 virtual void DenyCert(const GURL& url,
26 net::X509Certificate* cert,
27 net::CertStatus error) OVERRIDE;
28 virtual void AllowCert(const GURL& url,
29 net::X509Certificate* cert,
30 net::CertStatus error) OVERRIDE;
31 virtual void Clear() OVERRIDE;
32 virtual net::CertPolicy::Judgment QueryPolicy(const GURL& url,
33 net::X509Certificate* cert,
34 net::CertStatus error) OVERRIDE;
35 virtual void RevokeAllowAndDenyPreferences(const GURL& url) OVERRIDE;
36 virtual bool HasAllowedOrDeniedCert(const GURL& url) OVERRIDE;
37
38 // Called on the UI thread when the profile is about to be destroyed.
39 void ShutdownOnUIThread() {}
40
41 protected:
42 virtual ~ChromeSSLHostStateDecisions();
43
44 // SetClock takes ownership of the passed in clock.
45 void SetClock(scoped_ptr<base::Clock> clock) {
Ryan Sleevi 2014/07/08 23:53:29 IWYU: You need to include the base::Clock header I
jww 2014/07/11 00:08:41 Done.
46 clock_.reset(clock.release());
47 }
48
49 private:
50 enum CreateDictionaryEntriesDisposition {
51 CreateDictionaryEntries,
52 DoNotCreateDictionaryEntries
Ryan Sleevi 2014/07/08 23:53:29 Document
jww 2014/07/11 00:08:41 Done.
53 };
54
55 void ChangeCertPolicy(const GURL& url,
56 net::X509Certificate* cert,
57 net::CertStatus error,
58 net::CertPolicy::Judgment judgment);
Ryan Sleevi 2014/07/08 23:53:29 Document
jww 2014/07/11 00:08:41 Done.
59 base::DictionaryValue* GetValidCertDecisionsDict(
60 base::DictionaryValue* dict,
61 CreateDictionaryEntriesDisposition create_entries);
Ryan Sleevi 2014/07/08 23:53:29 Document
jww 2014/07/11 00:08:41 Done.
62
63 scoped_ptr<base::Clock> clock_;
64 const base::TimeDelta defaultSSLCertDecisionExpirationDelta_;
Ryan Sleevi 2014/07/08 23:53:29 IWYU: base/time.h
jww 2014/07/11 00:08:41 Done.
65 Profile* profile_;
66
67 friend class RememberSSLHostStateDecisionsTest;
Ryan Sleevi 2014/07/08 23:53:29 As in life, it's good to put our friends first. (T
jww 2014/07/11 00:08:41 Done.
68 FRIEND_TEST_ALL_PREFIXES(RememberSSLHostStateDecisionsTest, AfterRestart);
69
70 DISALLOW_COPY_AND_ASSIGN(ChromeSSLHostStateDecisions);
71 };
72
73 #endif // CHROME_BROWSER_SSL_CHROME_SSL_HOST_STATE_DECISIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698