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

Unified Diff: chrome/browser/tab_contents/navigation_entry.h

Issue 2067003: Track "display" and "run" separately for mixed content, and make the latter d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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: chrome/browser/tab_contents/navigation_entry.h
===================================================================
--- chrome/browser/tab_contents/navigation_entry.h (revision 47175)
+++ chrome/browser/tab_contents/navigation_entry.h (working copy)
@@ -37,8 +37,17 @@
public:
// Flags used for the page security content status.
enum ContentStatusFlags {
- NORMAL_CONTENT = 0, // No mixed content.
- MIXED_CONTENT = 1 << 0, // https page containing http resources.
+ // HTTP page, or HTTPS page with no insecure content.
+ NORMAL_CONTENT = 0,
+
+ // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
+ DISPLAYED_MIXED_CONTENT = 1 << 0,
+
+ // HTTPS page containing "executed" HTTP resources (i.e. script).
+ // Also currently used for HTTPS page containing broken-HTTPS resources;
+ // this is wrong and should be fixed (see comments in
+ // SSLPolicy::OnRequestStarted()).
+ RAN_MIXED_CONTENT = 1 << 1,
};
SSLStatus();
@@ -79,15 +88,20 @@
return security_bits_;
}
- // Mixed content means that this page which is served over https contains
- // http sub-resources.
- void set_has_mixed_content() {
- content_status_ |= MIXED_CONTENT;
+ void set_displayed_mixed_content() {
+ content_status_ |= DISPLAYED_MIXED_CONTENT;
}
- bool has_mixed_content() const {
- return (content_status_ & MIXED_CONTENT) != 0;
+ bool displayed_mixed_content() const {
+ return (content_status_ & DISPLAYED_MIXED_CONTENT) != 0;
}
+ void set_ran_mixed_content() {
+ content_status_ |= RAN_MIXED_CONTENT;
+ }
+ bool ran_mixed_content() const {
+ return (content_status_ & RAN_MIXED_CONTENT) != 0;
+ }
+
// Raw accessors for all the content status flags. This contains a
// combination of any of the ContentStatusFlags defined above. It is used
// by some tests for checking and for certain copying. Use the per-status

Powered by Google App Engine
This is Rietveld 408576698