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

Side by Side Diff: android_webview/browser/aw_ssl_host_state_delegate.h

Issue 2225213004: Teach SSLHostStateDelegate about subresources with cert errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | android_webview/browser/aw_ssl_host_state_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 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 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 ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_
6 #define ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ 6 #define ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void Clear() override; 57 void Clear() override;
58 58
59 // Queries whether |cert| is allowed or denied for |host| and |error|. 59 // Queries whether |cert| is allowed or denied for |host| and |error|.
60 content::SSLHostStateDelegate::CertJudgment QueryPolicy( 60 content::SSLHostStateDelegate::CertJudgment QueryPolicy(
61 const std::string& host, 61 const std::string& host,
62 const net::X509Certificate& cert, 62 const net::X509Certificate& cert,
63 net::CertStatus error, 63 net::CertStatus error,
64 bool* expired_previous_decision) override; 64 bool* expired_previous_decision) override;
65 65
66 // Records that a host has run insecure content. 66 // Records that a host has run insecure content.
67 void HostRanInsecureContent(const std::string& host, int pid) override; 67 void HostRanInsecureContent(const std::string& host,
68 int pid,
69 InsecureContentType content_type) override;
68 70
69 // Returns whether the specified host ran insecure content. 71 // Returns whether the specified host ran insecure content.
70 bool DidHostRunInsecureContent(const std::string& host, 72 bool DidHostRunInsecureContent(
71 int pid) const override; 73 const std::string& host,
74 int pid,
75 InsecureContentType content_type) const override;
72 76
73 // Revokes all SSL certificate error allow exceptions made by the user for 77 // Revokes all SSL certificate error allow exceptions made by the user for
74 // |host|. 78 // |host|.
75 void RevokeUserAllowExceptions(const std::string& host) override; 79 void RevokeUserAllowExceptions(const std::string& host) override;
76 80
77 // Returns whether the user has allowed a certificate error exception for 81 // Returns whether the user has allowed a certificate error exception for
78 // |host|. This does not mean that *all* certificate errors are allowed, just 82 // |host|. This does not mean that *all* certificate errors are allowed, just
79 // that there exists an exception. To see if a particular certificate and 83 // that there exists an exception. To see if a particular certificate and
80 // error combination exception is allowed, use QueryPolicy(). 84 // error combination exception is allowed, use QueryPolicy().
81 bool HasAllowException(const std::string& host) const override; 85 bool HasAllowException(const std::string& host) const override;
82 86
83 private: 87 private:
84 // Certificate policies for each host. 88 // Certificate policies for each host.
85 std::map<std::string, internal::CertPolicy> cert_policy_for_host_; 89 std::map<std::string, internal::CertPolicy> cert_policy_for_host_;
86 90
87 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate); 91 DISALLOW_COPY_AND_ASSIGN(AwSSLHostStateDelegate);
88 }; 92 };
89 93
90 } // namespace android_webview 94 } // namespace android_webview
91 95
92 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_ 96 #endif // ANDROID_WEBVIEW_BROWSER_AW_SSL_HOST_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_ssl_host_state_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698