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

Unified Diff: chrome/browser/geolocation/geolocation_content_settings_map.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/geolocation/geolocation_content_settings_map.cc
===================================================================
--- chrome/browser/geolocation/geolocation_content_settings_map.cc (revision 91968)
+++ chrome/browser/geolocation/geolocation_content_settings_map.cc (working copy)
@@ -24,12 +24,12 @@
#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/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "net/base/dns_util.h"
#include "net/base/static_cookie_policy.h"
@@ -43,7 +43,7 @@
prefs_registrar_.Init(profile_->GetPrefs());
prefs_registrar_.Add(prefs::kGeolocationDefaultContentSetting, this);
prefs_registrar_.Add(prefs::kGeolocationContentSettings, this);
- notification_registrar_.Add(this, NotificationType::PROFILE_DESTROYED,
+ notification_registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
Source<Profile>(profile_));
}
@@ -199,16 +199,16 @@
void GeolocationContentSettingsMap::NotifyObservers(
const ContentSettingsDetails& details) {
NotificationService::current()->Notify(
- NotificationType::GEOLOCATION_SETTINGS_CHANGED,
+ chrome::NOTIFICATION_GEOLOCATION_SETTINGS_CHANGED,
Source<GeolocationContentSettingsMap>(this),
Details<const ContentSettingsDetails>(&details));
}
void GeolocationContentSettingsMap::Observe(
- NotificationType type,
+ int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::PREF_CHANGED) {
+ if (type == chrome::NOTIFICATION_PREF_CHANGED) {
const std::string& name = *Details<std::string>(details).ptr();
if (name == prefs::kGeolocationDefaultContentSetting) {
ContentSettingsDetails details(ContentSettingsPattern(),
@@ -217,7 +217,7 @@
std::string());
NotifyObservers(details);
}
- } else if (NotificationType::PROFILE_DESTROYED == type) {
+ } else if (chrome::NOTIFICATION_PROFILE_DESTROYED == type) {
UnregisterObservers();
} else {
NOTREACHED();
@@ -229,7 +229,7 @@
if (!profile_)
return;
prefs_registrar_.RemoveAll();
- notification_registrar_.Remove(this, NotificationType::PROFILE_DESTROYED,
+ notification_registrar_.Remove(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
Source<Profile>(profile_));
profile_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698