diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 17:42:42 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-24 17:42:42 +0000 |
commit | 8a3422c9488ce79e305973d29a01811762e35465 (patch) | |
tree | 7fc94cb7aa013f7bb2afaf4100b1a8f45208cc00 /chrome/browser/ssl_manager.h | |
parent | 5eb64653873981c7dbf693a9aba7c7da011b14a3 (diff) | |
download | chromium_src-8a3422c9488ce79e305973d29a01811762e35465.zip chromium_src-8a3422c9488ce79e305973d29a01811762e35465.tar.gz chromium_src-8a3422c9488ce79e305973d29a01811762e35465.tar.bz2 |
This CL adds new UI tests for the SSL UI.
Some more info:
SSL UI Tests:
Added new tests for redirects and frames.
Also improved the mixed-content test to exercise the "block mixed-contents" preference and the show info-bar.
Automation:
For the new UI tests, added methods to tab_proxy and browser_proxy. The ones of most interest are GetLastNavigatinTime and WaitForNavigation that ensures we wait for a navigation to occur or have occured when taking actions that asynchronously trigger navigations.
Resource loading:
Added a flag to the response we get when loading a resource that indicates whether that resource was filtered (blocked or altered) by the security peer. We use this flag to notify back the browser when we report a load has been committed.
This is so the SSL manager knows a frame has been filtered (in which case we have no cert info but should not consider that as unsafe).
BUG=2004
Review URL: http://codereview.chromium.org/3165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2553 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_manager.h')
-rw-r--r-- | chrome/browser/ssl_manager.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/chrome/browser/ssl_manager.h b/chrome/browser/ssl_manager.h index f0409b7..a5f466f 100644 --- a/chrome/browser/ssl_manager.h +++ b/chrome/browser/ssl_manager.h @@ -18,6 +18,7 @@ #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" #include "chrome/common/render_messages.h" +#include "chrome/views/link.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "net/base/ssl_info.h" @@ -25,6 +26,7 @@ #include "webkit/glue/console_message_level.h" #include "webkit/glue/resource_type.h" +class AutomationProvider; class InfoBarItemView; class NavigationEntry; class LoadFromMemoryCacheDetails; @@ -34,7 +36,6 @@ class PrefService; class ResourceRedirectDetails; class ResourceRequestDetails; class SSLErrorInfo; -class SSLInfoBar; class TabContents; class Task; class URLRequest; @@ -261,6 +262,32 @@ class SSLManager : public NotificationObserver { virtual SecurityStyle GetDefaultStyle(const GURL& url) = 0; }; + // An info bar with a message and an optional link that runs a task when + // clicked. + class SSLInfoBar : public InfoBarItemView, + public ChromeViews::LinkController { + public: + SSLInfoBar(SSLManager* manager, + const std::wstring& message, + const std::wstring& link_text, + Task* task); + + virtual ~SSLInfoBar(); + + const std::wstring GetMessageText() const; + + // ChromeViews::LinkController method. + virtual void LinkActivated(ChromeViews::Link* source, int event_flags); + + private: + ChromeViews::Label* label_; + ChromeViews::Link* link_; + SSLManager* manager_; + scoped_ptr<Task> task_; + + DISALLOW_COPY_AND_ASSIGN(SSLInfoBar); + }; + static void RegisterUserPrefs(PrefService* prefs); // Construct an SSLManager for the specified tab. @@ -400,6 +427,9 @@ class SSLManager : public NotificationObserver { std::wstring* ca_name); private: + // The AutomationProvider needs to access the InfoBars. + friend class AutomationProvider; + // SSLMessageInfo contains the information necessary for displaying a message // in an info-bar. struct SSLMessageInfo { |