Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: chrome/browser/ui/login/login_prompt_browsertest.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/login/login_prompt.cc ('k') | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_prompt_browsertest.cc
===================================================================
--- chrome/browser/ui/login/login_prompt_browsertest.cc (revision 91968)
+++ chrome/browser/ui/login/login_prompt_browsertest.cc (working copy)
@@ -11,6 +11,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/login/login_prompt.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "content/browser/browser_thread.h"
@@ -73,7 +74,7 @@
auth_supplied_count_(0),
auth_cancelled_count_(0) {}
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details);
@@ -100,20 +101,20 @@
};
void LoginPromptBrowserTestObserver::Observe(
- NotificationType type,
+ int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::AUTH_NEEDED) {
+ if (type == chrome::NOTIFICATION_AUTH_NEEDED) {
LoginNotificationDetails* login_details =
Details<LoginNotificationDetails>(details).ptr();
AddHandler(login_details->handler());
auth_needed_count_++;
- } else if (type == NotificationType::AUTH_SUPPLIED) {
+ } else if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) {
AuthSuppliedLoginNotificationDetails* login_details =
Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
RemoveHandler(login_details->handler());
auth_supplied_count_++;
- } else if (type == NotificationType::AUTH_CANCELLED) {
+ } else if (type == chrome::NOTIFICATION_AUTH_CANCELLED) {
LoginNotificationDetails* login_details =
Details<LoginNotificationDetails>(details).ptr();
RemoveHandler(login_details->handler());
@@ -141,12 +142,12 @@
void LoginPromptBrowserTestObserver::Register(
const NotificationSource& source) {
- registrar_.Add(this, NotificationType::AUTH_NEEDED, source);
- registrar_.Add(this, NotificationType::AUTH_SUPPLIED, source);
- registrar_.Add(this, NotificationType::AUTH_CANCELLED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_AUTH_NEEDED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED, source);
}
-template <NotificationType::Type T>
+template <int T>
class WindowedNavigationObserver
: public ui_test_utils::WindowedNotificationObserver {
public:
@@ -155,16 +156,16 @@
T, Source<NavigationController>(controller)) {}
};
-typedef WindowedNavigationObserver<NotificationType::LOAD_STOP>
+typedef WindowedNavigationObserver<content::NOTIFICATION_LOAD_STOP>
WindowedLoadStopObserver;
-typedef WindowedNavigationObserver<NotificationType::AUTH_NEEDED>
+typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_NEEDED>
WindowedAuthNeededObserver;
-typedef WindowedNavigationObserver<NotificationType::AUTH_CANCELLED>
+typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_CANCELLED>
WindowedAuthCancelledObserver;
-typedef WindowedNavigationObserver<NotificationType::AUTH_SUPPLIED>
+typedef WindowedNavigationObserver<chrome::NOTIFICATION_AUTH_SUPPLIED>
WindowedAuthSuppliedObserver;
const char* kPrefetchAuthPage = "files/login/prefetch.html";
« no previous file with comments | « chrome/browser/ui/login/login_prompt.cc ('k') | chrome/browser/ui/omnibox/omnibox_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698