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

Side by Side Diff: content/public/browser/ssl_host_state_delegate.h

Issue 369703002: Remember user decisions on invalid certificates behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed broken include Created 6 years, 4 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 CONTENT_BROWSER_SSL_HOST_STATE_DELEGATE_H_
6 #define CONTENT_BROWSER_SSL_HOST_STATE_DELEGATE_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h"
11 #include "net/cert/x509_certificate.h"
12
13 namespace content {
14
15 // SSLHostStateDelegate may be implemented by the embedder to provide a storage
16 // strategy for certificate decisions.
17 class SSLHostStateDelegate {
18 public:
19 // Records that |cert| is not permitted to be used for |host| in the future,
20 // for a specified |error| type.
21 virtual void DenyCert(const std::string& host,
22 net::X509Certificate* cert,
23 net::CertStatus error) = 0;
24
25 // Records that |cert| is permitted to be used for |host| in the future, for
26 // a specified |error| type.
27 virtual void AllowCert(const std::string&,
28 net::X509Certificate* cert,
29 net::CertStatus error) = 0;
30
31 // Clear all allow/deny preferences.
32 virtual void Clear() = 0;
33
34 // Queries whether |cert| is allowed or denied for |host| and |error|.
35 virtual net::CertPolicy::Judgment QueryPolicy(const std::string& host,
36 net::X509Certificate* cert,
37 net::CertStatus error) = 0;
38
39 // Revoke all allow/deny preferences for |host|.
40 virtual void RevokeAllowAndDenyPreferences(const std::string& host) = 0;
41
42 // Returns true if any decisions has been recorded for |host|, otherwise
43 // false.
44 virtual bool HasAllowedOrDeniedCert(const std::string& host) = 0;
45
46 protected:
47 virtual ~SSLHostStateDelegate() {}
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_SSL_HOST_STATE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698