diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:38:36 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-15 00:38:36 +0000 |
commit | 18de157f6c4c5eee14ad84e037def47a7f52a3a8 (patch) | |
tree | ade764c9a40927c1856a759d0f92e6456bf7f2ea /chrome/browser/tab_contents/navigation_entry.h | |
parent | 429e1ec2b634ce856c43f077ae6d18d537fc86f2 (diff) | |
download | chromium_src-18de157f6c4c5eee14ad84e037def47a7f52a3a8.zip chromium_src-18de157f6c4c5eee14ad84e037def47a7f52a3a8.tar.gz chromium_src-18de157f6c4c5eee14ad84e037def47a7f52a3a8.tar.bz2 |
(Original patch reviewed at http://codereview.chromium.org/2067003 )
Track "display" and "run" separately for mixed content, and make the latter downgrade the SSL state to "authentication broken".
Make the "display" state only affect the current tab (not the entire host).
Fix an SSL browser test by supplying the appropriate SiteInstance*.
Move a test from "disabled" to "flaky" since it at least passes for me.
Make the SSLManager header and .cc files put functions in the same order, and make that order somewhat saner.
BUG=15072, 18626, 40932, 42758
TEST=Covered by browser tests
Review URL: http://codereview.chromium.org/2063008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/navigation_entry.h')
-rw-r--r-- | chrome/browser/tab_contents/navigation_entry.h | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/chrome/browser/tab_contents/navigation_entry.h b/chrome/browser/tab_contents/navigation_entry.h index 7aaa5e0..833107c 100644 --- a/chrome/browser/tab_contents/navigation_entry.h +++ b/chrome/browser/tab_contents/navigation_entry.h @@ -37,8 +37,17 @@ class NavigationEntry { 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,13 +88,18 @@ class NavigationEntry { 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 displayed_mixed_content() const { + return (content_status_ & DISPLAYED_MIXED_CONTENT) != 0; + } + + void set_ran_mixed_content() { + content_status_ |= RAN_MIXED_CONTENT; } - bool has_mixed_content() const { - return (content_status_ & MIXED_CONTENT) != 0; + bool ran_mixed_content() const { + return (content_status_ & RAN_MIXED_CONTENT) != 0; } // Raw accessors for all the content status flags. This contains a |