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

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

Issue 2226523002: Add separate plumbing for subresources with certificate errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 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
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 CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 30 matching lines...) Expand all
41 virtual void Clear() = 0; 41 virtual void Clear() = 0;
42 42
43 // Queries whether |cert| is allowed for |host| and |error|. Returns true in 43 // Queries whether |cert| is allowed for |host| and |error|. Returns true in
44 // |expired_previous_decision| if a previous user decision expired immediately 44 // |expired_previous_decision| if a previous user decision expired immediately
45 // prior to this query, otherwise false. 45 // prior to this query, otherwise false.
46 virtual CertJudgment QueryPolicy(const std::string& host, 46 virtual CertJudgment QueryPolicy(const std::string& host,
47 const net::X509Certificate& cert, 47 const net::X509Certificate& cert,
48 net::CertStatus error, 48 net::CertStatus error,
49 bool* expired_previous_decision) = 0; 49 bool* expired_previous_decision) = 0;
50 50
51 // Records that a host has run insecure content. 51 // Records that a host has run insecure (HTTP) content.
52 virtual void HostRanInsecureContent(const std::string& host, int pid) = 0; 52 virtual void HostRanInsecureContent(const std::string& host, int pid) = 0;
53 53
54 // Returns whether the specified host ran insecure content. 54 // Returns whether the specified host ran insecure (HTTP) content.
55 virtual bool DidHostRunInsecureContent(const std::string& host, 55 virtual bool DidHostRunInsecureContent(const std::string& host,
56 int pid) const = 0; 56 int pid) const = 0;
57 57
58 // Records that a host has run content loaded over HTTPS with certificate
59 // errors.
60 virtual void HostRanContentWithCertificateErrors(const std::string& host,
61 int pid) = 0;
62
63 // Returns whether the specified host ran content loaded over HTTPS with
64 // certificate errors.
65 virtual bool DidHostRunContentWithCertificateErrors(const std::string& host,
66 int pid) const = 0;
67
58 // Revokes all SSL certificate error allow exceptions made by the user for 68 // Revokes all SSL certificate error allow exceptions made by the user for
59 // |host|. 69 // |host|.
60 virtual void RevokeUserAllowExceptions(const std::string& host) = 0; 70 virtual void RevokeUserAllowExceptions(const std::string& host) = 0;
61 71
62 // Returns whether the user has allowed a certificate error exception for 72 // Returns whether the user has allowed a certificate error exception for
63 // |host|. This does not mean that *all* certificate errors are allowed, just 73 // |host|. This does not mean that *all* certificate errors are allowed, just
64 // that there exists an exception. To see if a particular certificate and 74 // that there exists an exception. To see if a particular certificate and
65 // error combination exception is allowed, use QueryPolicy(). 75 // error combination exception is allowed, use QueryPolicy().
66 virtual bool HasAllowException(const std::string& host) const = 0; 76 virtual bool HasAllowException(const std::string& host) const = 0;
67 77
68 protected: 78 protected:
69 virtual ~SSLHostStateDelegate() {} 79 virtual ~SSLHostStateDelegate() {}
70 }; 80 };
71 81
72 } // namespace content 82 } // namespace content
73 83
74 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_ 84 #endif // CONTENT_PUBLIC_BROWSER_SSL_HOST_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698