summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl/ssl_manager.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-15 02:59:07 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-15 02:59:07 +0000
commit132048857e69b3f07e7d50bda996d1923c9c8e7b (patch)
treed98c67ef93da6b9cd31acf1532e6f2dbba18a97c /chrome/browser/ssl/ssl_manager.h
parentf3b6d491f7f4233b4862f7352f6ed477f3f1e95a (diff)
downloadchromium_src-132048857e69b3f07e7d50bda996d1923c9c8e7b.zip
chromium_src-132048857e69b3f07e7d50bda996d1923c9c8e7b.tar.gz
chromium_src-132048857e69b3f07e7d50bda996d1923c9c8e7b.tar.bz2
Revert 47347 - (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. Falied TestGoodFrameNavigation on Mac 10.5 browser tests among other things: /b/slave/chromium-rel-mac-builder/build/src/chrome/browser/ssl/ssl_browser_tests.cc:43: Failure Value of: entry->ssl().displayed_mixed_content() Actual: false Expected: displayed_mixed_content Which is: true BUG=15072, 18626, 40932, 42758 TEST=Covered by browser tests Review URL: http://codereview.chromium.org/2063008 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/2095006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl/ssl_manager.h')
-rw-r--r--chrome/browser/ssl/ssl_manager.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index 7d6c134..f9e1685 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -38,6 +38,18 @@ class URLRequest;
class SSLManager : public NotificationObserver {
public:
+ // Construct an SSLManager for the specified tab.
+ // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used.
+ explicit SSLManager(NavigationController* controller);
+ ~SSLManager();
+
+ SSLPolicy* policy() { return policy_.get(); }
+ SSLPolicyBackend* backend() { return &backend_; }
+
+ // The navigation controller associated with this SSLManager. The
+ // NavigationController is guaranteed to outlive the SSLManager.
+ NavigationController* controller() { return controller_; }
+
static void RegisterUserPrefs(PrefService* prefs);
// Entry point for SSLCertificateErrors. This function begins the process
@@ -51,9 +63,25 @@ class SSLManager : public NotificationObserver {
int cert_error,
net::X509Certificate* cert);
- // Called when SSL state for a host or tab changes. Broadcasts the
- // SSL_INTERNAL_STATE_CHANGED notification.
- static void NotifySSLInternalStateChanged();
+ // Mixed content entry points.
+ void DidDisplayInsecureContent();
+ void DidRunInsecureContent(const std::string& security_origin);
+
+ // Entry point for navigation. This function begins the process of updating
+ // the security UI when the main frame navigates to a new URL.
+ //
+ // Called on the UI thread.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ // This entry point is called directly (instead of via the notification
+ // service) because we need more precise control of the order in which folks
+ // are notified of this event.
+ void DidCommitProvisionalLoad(const NotificationDetails& details);
+
+ // Called to determine if there were any processed SSL errors from request.
+ bool ProcessedSSLErrorFromRequest() const;
// Convenience methods for serializing/deserializing the security info.
static std::string SerializeSecurityInfo(int cert_id,
@@ -67,37 +95,6 @@ class SSLManager : public NotificationObserver {
// Returns "<organization_name> [<country>]".
static std::wstring GetEVCertName(const net::X509Certificate& cert);
- // Construct an SSLManager for the specified tab.
- // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used.
- explicit SSLManager(NavigationController* controller);
- ~SSLManager();
-
- SSLPolicy* policy() { return policy_.get(); }
- SSLPolicyBackend* backend() { return &backend_; }
-
- // The navigation controller associated with this SSLManager. The
- // NavigationController is guaranteed to outlive the SSLManager.
- NavigationController* controller() { return controller_; }
-
- // This entry point is called directly (instead of via the notification
- // service) because we need more precise control of the order in which folks
- // are notified of this event.
- void DidCommitProvisionalLoad(const NotificationDetails& details);
-
- // Mixed content entry point.
- void DidRunInsecureContent(const std::string& security_origin);
-
- // Called to determine if there were any processed SSL errors from request.
- bool ProcessedSSLErrorFromRequest() const;
-
- // Entry point for navigation. This function begins the process of updating
- // the security UI when the main frame navigates to a new URL.
- //
- // Called on the UI thread.
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details);
-
private:
// SSLMessageInfo contains the information necessary for displaying a message
// in an info-bar.
@@ -133,6 +130,9 @@ class SSLManager : public NotificationObserver {
void DidReceiveResourceRedirect(ResourceRedirectDetails* details);
void DidChangeSSLInternalState();
+ // Dispatch NotificationType::SSL_VISIBLE_STATE_CHANGED notification.
+ void DispatchSSLVisibleStateChanged();
+
// Update the NavigationEntry with our current state.
void UpdateEntry(NavigationEntry* entry);