summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl/ssl_manager.h
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/ssl/ssl_manager.h
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/ssl/ssl_manager.h')
-rw-r--r--chrome/browser/ssl/ssl_manager.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index b15f7e8..b72f1377f 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -270,6 +270,7 @@ class SSLManager : public NotificationObserver {
ResourceType::Type resource_type,
const std::string& frame_origin,
const std::string& main_frame_origin,
+ FilterPolicy::Type filter_policy,
int ssl_cert_id,
int ssl_cert_status)
: manager_(manager),
@@ -277,6 +278,7 @@ class SSLManager : public NotificationObserver {
resource_type_(resource_type),
frame_origin_(frame_origin),
main_frame_origin_(main_frame_origin),
+ filter_policy_(filter_policy),
ssl_cert_id_(ssl_cert_id),
ssl_cert_status_(ssl_cert_status) {
}
@@ -286,6 +288,7 @@ class SSLManager : public NotificationObserver {
ResourceType::Type resource_type() const { return resource_type_; }
const std::string& frame_origin() const { return frame_origin_; }
const std::string& main_frame_origin() const { return main_frame_origin_; }
+ FilterPolicy::Type filter_policy() const { return filter_policy_; }
int ssl_cert_id() const { return ssl_cert_id_; }
int ssl_cert_status() const { return ssl_cert_status_; }
@@ -295,6 +298,7 @@ class SSLManager : public NotificationObserver {
ResourceType::Type resource_type_;
std::string frame_origin_;
std::string main_frame_origin_;
+ FilterPolicy::Type filter_policy_;
int ssl_cert_id_;
int ssl_cert_status_;
@@ -323,8 +327,8 @@ class SSLManager : public NotificationObserver {
// We have started a resource request with the given info.
virtual void OnRequestStarted(RequestInfo* info) = 0;
- // Returns the default security style for a given URL.
- virtual SecurityStyle GetDefaultStyle(const GURL& url) = 0;
+ // Update the SSL information in |entry| to match the current state.
+ virtual void UpdateEntry(SSLManager* manager, NavigationEntry* entry) = 0;
};
static void RegisterUserPrefs(PrefService* prefs);
@@ -441,15 +445,11 @@ class SSLManager : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
- // Entry point for navigation. This function begins the process of updating
- // the security UI when the main frame navigates.
- //
- // Called on the UI thread.
- void NavigationStateChanged();
-
// Called to determine if there were any processed SSL errors from request.
bool ProcessedSSLErrorFromRequest() const;
+ // The navigation controller associated with this SSLManager. The
+ // NavigationController is guaranteed to outlive the SSLManager.
NavigationController* controller() { return controller_; }
// Convenience methods for serializing/deserializing the security info.
@@ -510,8 +510,8 @@ class SSLManager : public NotificationObserver {
// Dispatch NotificationType::SSL_VISIBLE_STATE_CHANGED notification.
void DispatchSSLVisibleStateChanged();
- // Convenience method for initializing navigation entries.
- void InitializeEntryIfNeeded(NavigationEntry* entry);
+ // Update the NavigationEntry with our current state.
+ void UpdateEntry(NavigationEntry* entry);
// Shows the pending messages (in info-bars) if any.
void ShowPendingMessages();