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

Unified Diff: chrome/browser/profiles/profile_impl.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/profiles/profile_impl.cc
===================================================================
--- chrome/browser/profiles/profile_impl.cc (revision 91771)
+++ chrome/browser/profiles/profile_impl.cc (working copy)
@@ -76,6 +76,7 @@
#include "chrome/browser/web_resource/promo_resource_service.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
@@ -309,7 +310,7 @@
true));
// Wait for the notifcation that prefs has been loaded (successfully or
// not).
- registrar_.Add(this, NotificationType::PREF_INITIALIZATION_COMPLETED,
+ registrar_.Add(this, chrome::PREF_INITIALIZATION_COMPLETED,
Source<PrefService>(prefs_.get()));
} else {
// Load prefs synchronously.
@@ -350,7 +351,7 @@
#if !defined(OS_CHROMEOS)
// Listen for bookmark model load, to bootstrap the sync service.
// On CrOS sync service will be initialized after sign in.
- registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED,
+ registrar_.Add(this, chrome::BOOKMARK_MODEL_LOADED,
Source<Profile>(this));
#endif
@@ -585,7 +586,7 @@
ProfileImpl::~ProfileImpl() {
NotificationService::current()->Notify(
- NotificationType::PROFILE_DESTROYED,
+ chrome::PROFILE_DESTROYED,
Source<Profile>(this),
NotificationService::NoDetails());
@@ -690,7 +691,7 @@
off_the_record_profile_.swap(p);
NotificationService::current()->Notify(
- NotificationType::OTR_PROFILE_CREATED,
+ chrome::OTR_PROFILE_CREATED,
Source<Profile>(off_the_record_profile_.get()),
NotificationService::NoDetails());
}
@@ -858,7 +859,7 @@
// TODO(eroman): this isn't terribly useful anymore now that the
// net::URLRequestContext is constructed by the IO thread...
NotificationService::current()->Notify(
- NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE,
+ chrome::DEFAULT_REQUEST_CONTEXT_AVAILABLE,
NotificationService::AllSources(), NotificationService::NoDetails());
}
@@ -1014,7 +1015,7 @@
// Send out the notification that the history service was created.
NotificationService::current()->
- Notify(NotificationType::HISTORY_CREATED, Source<Profile>(this),
+ Notify(chrome::HISTORY_CREATED, Source<Profile>(this),
Details<HistoryService>(history_service_.get()));
}
return history_service_.get();
@@ -1349,16 +1350,16 @@
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::PREF_INITIALIZATION_COMPLETED: {
+ case chrome::PREF_INITIALIZATION_COMPLETED: {
bool* succeeded = Details<bool>(details).ptr();
PrefService *prefs = Source<PrefService>(source).ptr();
DCHECK(prefs == prefs_.get());
- registrar_.Remove(this, NotificationType::PREF_INITIALIZATION_COMPLETED,
+ registrar_.Remove(this, chrome::PREF_INITIALIZATION_COMPLETED,
Source<PrefService>(prefs));
OnPrefsLoaded(*succeeded);
break;
}
- case NotificationType::PREF_CHANGED: {
+ case chrome::PREF_CHANGED: {
std::string* pref_name_in = Details<std::string>(details).ptr();
PrefService* prefs = Source<PrefService>(source).ptr();
DCHECK(pref_name_in && prefs);
@@ -1393,9 +1394,9 @@
}
break;
}
- case NotificationType::BOOKMARK_MODEL_LOADED:
+ case chrome::BOOKMARK_MODEL_LOADED:
GetProfileSyncService(); // Causes lazy-load if sync is enabled.
- registrar_.Remove(this, NotificationType::BOOKMARK_MODEL_LOADED,
+ registrar_.Remove(this, chrome::BOOKMARK_MODEL_LOADED,
Source<Profile>(this));
break;
case NotificationType::ZOOM_LEVEL_CHANGED: {

Powered by Google App Engine
This is Rietveld 408576698