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

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: 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
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..28c9751a931c166c9f8ba9123fda63c7541c2470 100644
--- a/content/public/browser/ssl_host_state_delegate.h
+++ b/content/public/browser/ssl_host_state_delegate.h
@@ -31,6 +31,15 @@ class SSLHostStateDelegate {
ALLOWED
};
+ // The types of nonsecure subresources that this class keeps track of.
+ 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 +57,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,
jam 2016/08/11 19:53:13 nit: (in a followup if you agree), I just noticed
estark 2016/08/11 20:58:38 That sounds reasonable, I will file a bug to come
+ 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|.

Powered by Google App Engine
This is Rietveld 408576698