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

Unified Diff: chrome/browser/ui/login/login_prompt.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.h ('k') | chrome/browser/ui/login/login_prompt_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.cc
===================================================================
--- chrome/browser/ui/login/login_prompt.cc (revision 91968)
+++ chrome/browser/ui/login/login_prompt.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
@@ -191,29 +192,29 @@
void LoginHandler::AddObservers() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- registrar_.Add(this, NotificationType::AUTH_SUPPLIED,
+ registrar_.Add(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::AUTH_CANCELLED,
+ registrar_.Add(this, chrome::NOTIFICATION_AUTH_CANCELLED,
NotificationService::AllSources());
}
void LoginHandler::RemoveObservers() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- registrar_.Remove(this, NotificationType::AUTH_SUPPLIED,
+ registrar_.Remove(this, chrome::NOTIFICATION_AUTH_SUPPLIED,
NotificationService::AllSources());
- registrar_.Remove(this, NotificationType::AUTH_CANCELLED,
+ registrar_.Remove(this, chrome::NOTIFICATION_AUTH_CANCELLED,
NotificationService::AllSources());
DCHECK(registrar_.IsEmpty());
}
-void LoginHandler::Observe(NotificationType type,
+void LoginHandler::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(type == NotificationType::AUTH_SUPPLIED ||
- type == NotificationType::AUTH_CANCELLED);
+ DCHECK(type == chrome::NOTIFICATION_AUTH_SUPPLIED ||
+ type == chrome::NOTIFICATION_AUTH_CANCELLED);
TabContents* requesting_contents = GetTabContentsForLogin();
if (!requesting_contents)
@@ -235,12 +236,12 @@
return;
// Set or cancel the auth in this handler.
- if (type == NotificationType::AUTH_SUPPLIED) {
+ if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) {
AuthSuppliedLoginNotificationDetails* supplied_details =
Details<AuthSuppliedLoginNotificationDetails>(details).ptr();
SetAuth(supplied_details->username(), supplied_details->password());
} else {
- DCHECK(type == NotificationType::AUTH_CANCELLED);
+ DCHECK(type == chrome::NOTIFICATION_AUTH_CANCELLED);
CancelAuth();
}
}
@@ -271,7 +272,7 @@
LoginNotificationDetails details(this);
- service->Notify(NotificationType::AUTH_NEEDED,
+ service->Notify(chrome::NOTIFICATION_AUTH_NEEDED,
Source<NavigationController>(controller),
Details<LoginNotificationDetails>(&details));
}
@@ -289,7 +290,7 @@
LoginNotificationDetails details(this);
- service->Notify(NotificationType::AUTH_CANCELLED,
+ service->Notify(chrome::NOTIFICATION_AUTH_CANCELLED,
Source<NavigationController>(controller),
Details<LoginNotificationDetails>(&details));
}
@@ -307,7 +308,7 @@
NavigationController* controller = &requesting_contents->controller();
AuthSuppliedLoginNotificationDetails details(this, username, password);
- service->Notify(NotificationType::AUTH_SUPPLIED,
+ service->Notify(chrome::NOTIFICATION_AUTH_SUPPLIED,
Source<NavigationController>(controller),
Details<AuthSuppliedLoginNotificationDetails>(&details));
}
« no previous file with comments | « chrome/browser/ui/login/login_prompt.h ('k') | chrome/browser/ui/login/login_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698