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

Unified Diff: chrome/browser/background/background_mode_manager.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/background/background_mode_manager.cc
===================================================================
--- chrome/browser/background/background_mode_manager.cc (revision 91771)
+++ chrome/browser/background/background_mode_manager.cc (working copy)
@@ -18,6 +18,7 @@
#include "chrome/browser/status_icons/status_tray.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
@@ -198,15 +199,15 @@
// Listen for when extensions are loaded/unloaded so we can track the
// number of background apps and modify our keep-alive and launch-on-startup
// state appropriately.
- registrar_.Add(this, NotificationType::EXTENSION_LOADED,
+ registrar_.Add(this, chrome::EXTENSION_LOADED,
Source<Profile>(profile));
- registrar_.Add(this, NotificationType::EXTENSION_UNLOADED,
+ registrar_.Add(this, chrome::EXTENSION_UNLOADED,
Source<Profile>(profile));
// Check for the presence of background apps after all extensions have been
// loaded, to handle the case where an extension has been manually removed
// while Chrome was not running.
- registrar_.Add(this, NotificationType::EXTENSIONS_READY,
+ registrar_.Add(this, chrome::EXTENSIONS_READY,
Source<Profile>(profile));
bmd->applications_->AddObserver(this);
@@ -223,7 +224,7 @@
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::PREF_CHANGED:
+ case chrome::PREF_CHANGED:
DCHECK(*Details<std::string>(details).ptr() ==
prefs::kBackgroundModeEnabled);
if (IsBackgroundModePrefEnabled())
@@ -231,7 +232,7 @@
else
DisableBackgroundMode();
break;
- case NotificationType::EXTENSIONS_READY:
+ case chrome::EXTENSIONS_READY:
// Extensions are loaded, so we don't need to manually keep the browser
// process alive any more when running in no-startup-window mode.
EndKeepAliveForStartup();
@@ -246,7 +247,7 @@
EnableLaunchOnStartup(background_app_count_ > 0);
#endif
break;
- case NotificationType::EXTENSION_LOADED: {
+ case chrome::EXTENSION_LOADED: {
Extension* extension = Details<Extension>(details).ptr();
if (BackgroundApplicationListModel::IsBackgroundApp(*extension)) {
// Extensions loaded after the ExtensionsService is ready should be
@@ -258,7 +259,7 @@
}
}
break;
- case NotificationType::EXTENSION_UNLOADED:
+ case chrome::EXTENSION_UNLOADED:
if (BackgroundApplicationListModel::IsBackgroundApp(
*Details<UnloadedExtensionInfo>(details)->extension)) {
Details<UnloadedExtensionInfo> info =

Powered by Google App Engine
This is Rietveld 408576698