summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 01:37:47 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 01:37:47 +0000
commite4182160e5cfb36d623ca3f7baef71ea4fd980af (patch)
treec59e127afa23ac826c61c01b6899fb0ac3911c5f /chrome/browser/tab_contents
parent1ccd006ccad33e8d4480435c81d04d0706d63ca7 (diff)
downloadchromium_src-e4182160e5cfb36d623ca3f7baef71ea4fd980af.zip
chromium_src-e4182160e5cfb36d623ca3f7baef71ea4fd980af.tar.gz
chromium_src-e4182160e5cfb36d623ca3f7baef71ea4fd980af.tar.bz2
SSLPolicy fix: Step 9 of 9 (hopefully!).
Change our algorithm for computing the state of our SSL security indicators. Previously, we were computing this state for a single navigation entry. Although this matches other browsers, it fails to take the same-origin policy into account. For example, if one tab is contaminated with insecure content, that insecure content can spread to all the tabs in the same security origin. R=jcampan,wtc BUG=8706 TEST=SSLUITest.TestMixedContentsRandomizeHash,SSLUITest.TestMixedContentsTwoTabs Review URL: http://codereview.chromium.org/42314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/navigation_controller.cc5
-rw-r--r--chrome/browser/tab_contents/navigation_entry.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.cc b/chrome/browser/tab_contents/navigation_controller.cc
index 38dafb6d..3dbdef8 100644
--- a/chrome/browser/tab_contents/navigation_controller.cc
+++ b/chrome/browser/tab_contents/navigation_controller.cc
@@ -1011,10 +1011,6 @@ void NavigationController::NavigateToPendingEntry(bool reload) {
pending_entry_ = entries_[pending_entry_index_].get();
}
- // Reset the security states as any SSL error may have been resolved since we
- // last visited that page.
- pending_entry_->ssl() = NavigationEntry::SSLStatus();
-
if (from_contents && from_contents->type() != pending_entry_->tab_type())
from_contents->set_is_active(false);
@@ -1036,7 +1032,6 @@ void NavigationController::NotifyNavigationEntryCommitted(
// TODO(pkasting): http://b/1113079 Probably these explicit notification paths
// should be removed, and interested parties should just listen for the
// notification below instead.
- ssl_manager_.NavigationStateChanged();
active_contents_->NotifyNavigationStateChanged(
TabContents::INVALIDATE_EVERYTHING);
diff --git a/chrome/browser/tab_contents/navigation_entry.h b/chrome/browser/tab_contents/navigation_entry.h
index 48e1750..16801b3 100644
--- a/chrome/browser/tab_contents/navigation_entry.h
+++ b/chrome/browser/tab_contents/navigation_entry.h
@@ -45,6 +45,14 @@ class NavigationEntry {
SSLStatus();
+ bool Equals(const SSLStatus& status) const {
+ return security_style_ == status.security_style_ &&
+ cert_id_ == status.cert_id_ &&
+ cert_status_ == status.cert_status_ &&
+ security_bits_ == status.security_bits_ &&
+ content_status_ == status.content_status_;
+ }
+
void set_security_style(SecurityStyle security_style) {
security_style_ = security_style;
}