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

Unified Diff: chrome/browser/download/download_request_limiter.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/download/download_request_limiter.h ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_request_limiter.cc
===================================================================
--- chrome/browser/download/download_request_limiter.cc (revision 91968)
+++ chrome/browser/download/download_request_limiter.cc (working copy)
@@ -31,9 +31,9 @@
download_count_(0),
infobar_(NULL) {
Source<NavigationController> notification_source(controller);
- registrar_.Add(this, NotificationType::NAV_ENTRY_PENDING,
+ registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
notification_source);
- registrar_.Add(this, NotificationType::TAB_CLOSED, notification_source);
+ registrar_.Add(this, content::NOTIFICATION_TAB_CLOSED, notification_source);
NavigationEntry* active_entry = originating_controller ?
originating_controller->GetActiveEntry() : controller->GetActiveEntry();
@@ -91,18 +91,18 @@
}
void DownloadRequestLimiter::TabDownloadState::Observe(
- NotificationType type,
+ int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if ((type != NotificationType::NAV_ENTRY_PENDING &&
- type != NotificationType::TAB_CLOSED) ||
+ if ((type != content::NOTIFICATION_NAV_ENTRY_PENDING &&
+ type != content::NOTIFICATION_TAB_CLOSED) ||
Source<NavigationController>(source).ptr() != controller_) {
NOTREACHED();
return;
}
- switch (type.value) {
- case NotificationType::NAV_ENTRY_PENDING: {
+ switch (type) {
+ case content::NOTIFICATION_NAV_ENTRY_PENDING: {
// NOTE: resetting state on a pending navigate isn't ideal. In particular
// it is possible that queued up downloads for the page before the
// pending navigate will be delivered to us after we process this
@@ -131,7 +131,7 @@
break;
}
- case NotificationType::TAB_CLOSED:
+ case content::NOTIFICATION_TAB_CLOSED:
// Tab closed, no need to handle closing the dialog as it's owned by the
// TabContents, break so that we get deleted after switch.
break;
« no previous file with comments | « chrome/browser/download/download_request_limiter.h ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698