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

Unified Diff: chrome/browser/content_settings/content_settings_notification_provider.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
Index: chrome/browser/content_settings/content_settings_notification_provider.cc
===================================================================
--- chrome/browser/content_settings/content_settings_notification_provider.cc (revision 91968)
+++ chrome/browser/content_settings/content_settings_notification_provider.cc (working copy)
@@ -13,11 +13,11 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/content_settings_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
#include "googleurl/src/gurl.h"
namespace {
@@ -156,13 +156,13 @@
ResetAllOrigins();
}
-void NotificationProvider::Observe(NotificationType type,
+void NotificationProvider::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (NotificationType::PREF_CHANGED == type) {
+ if (chrome::NOTIFICATION_PREF_CHANGED == type) {
const std::string& name = *Details<std::string>(details).ptr();
OnPrefsChanged(name);
- } else if (NotificationType::PROFILE_DESTROYED == type) {
+ } else if (chrome::NOTIFICATION_PROFILE_DESTROYED == type) {
StopObserving();
}
}
@@ -178,11 +178,11 @@
prefs_registrar_.Add(prefs::kDesktopNotificationAllowedOrigins, this);
prefs_registrar_.Add(prefs::kDesktopNotificationDeniedOrigins, this);
- notification_registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
NotificationService::AllSources());
}
- notification_registrar_.Add(this, NotificationType::PROFILE_DESTROYED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
Source<Profile>(profile_));
}
@@ -207,7 +207,7 @@
// notification, and use the HostContentSettingsMap as source once this
// content settings provider in integrated in the HostContentSetttingsMap.
NotificationService::current()->Notify(
- NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
+ chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
Source<DesktopNotificationService>(
DesktopNotificationServiceFactory::GetForProfile(profile_)),
NotificationService::NoDetails());

Powered by Google App Engine
This is Rietveld 408576698