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

Unified Diff: content/public/browser/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/ssl/ssl_policy_backend.cc ('k') | content/test/mock_ssl_host_state_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/ssl_host_state_delegate.h
diff --git a/content/public/browser/ssl_host_state_delegate.h b/content/public/browser/ssl_host_state_delegate.h
index b06b40858fedc0f7edc64bf805967f8f558e4dcc..8c94820fc0dbc55c772811a3a08516d5ea5dd8d0 100644
--- a/content/public/browser/ssl_host_state_delegate.h
+++ b/content/public/browser/ssl_host_state_delegate.h
@@ -31,6 +31,20 @@ class SSLHostStateDelegate {
ALLOWED
};
+ // The types of nonsecure subresources that this class keeps track of.
+ //
+ // TODO(estark): Currently, MIXED_CONTENT is used for all insecure
+ // content, as SSLManager/SSLPolicy do not separate signals for mixed
+ // content from signals for subresources with cert errors. Fixing this
+ // is in progress as part of https://crbug.com/634171.
+ enum InsecureContentType {
+ // A MIXED subresource was loaded over HTTP on an HTTPS page.
+ MIXED_CONTENT,
+ // A CERT_ERRORS subresource was loaded over HTTPS with certificate
+ // errors on an HTTPS page.
+ CERT_ERRORS_CONTENT,
+ };
+
// Records that |cert| is permitted to be used for |host| in the future, for
// a specified |error| type.
virtual void AllowCert(const std::string&,
@@ -48,12 +62,17 @@ class SSLHostStateDelegate {
net::CertStatus error,
bool* expired_previous_decision) = 0;
- // Records that a host has run insecure content.
- virtual void HostRanInsecureContent(const std::string& host, int pid) = 0;
+ // Records that a host has run insecure content of the given |content_type|.
+ virtual void HostRanInsecureContent(const std::string& host,
+ int pid,
+ InsecureContentType content_type) = 0;
- // Returns whether the specified host ran insecure content.
- virtual bool DidHostRunInsecureContent(const std::string& host,
- int pid) const = 0;
+ // Returns whether the specified host ran insecure content of the given
+ // |content_type|.
+ virtual bool DidHostRunInsecureContent(
+ const std::string& host,
+ int pid,
+ InsecureContentType content_type) const = 0;
// Revokes all SSL certificate error allow exceptions made by the user for
// |host|.
« no previous file with comments | « content/browser/ssl/ssl_policy_backend.cc ('k') | content/test/mock_ssl_host_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698