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

Unified Diff: chrome/browser/performance_monitor/performance_monitor.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 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/performance_monitor/performance_monitor.cc
diff --git a/chrome/browser/performance_monitor/performance_monitor.cc b/chrome/browser/performance_monitor/performance_monitor.cc
index dd76da90000dd70e37217c7c1e9b87674e1b4603..d8b214ecc04cace05d6c7469103df49a56994a4a 100644
--- a/chrome/browser/performance_monitor/performance_monitor.cc
+++ b/chrome/browser/performance_monitor/performance_monitor.cc
@@ -229,17 +229,21 @@ void PerformanceMonitor::RegisterForNotifications() {
DCHECK(database_logging_enabled_);
// Extensions
+ registrar_.Add(
+ this,
+ extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
+ content::NotificationService::AllSources());
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED,
+ extensions::NOTIFICATION_EXTENSION_ENABLED,
+ content::NotificationService::AllSources());
+ registrar_.Add(this,
+ extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
+ content::NotificationService::AllSources());
+ registrar_.Add(this,
+ extensions::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED,
- content::NotificationService::AllSources());
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::NotificationService::AllSources());
- registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE,
- content::NotificationService::AllSources());
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
+ extensions::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED,
content::NotificationService::AllSources());
// Crashes
@@ -556,19 +560,19 @@ void PerformanceMonitor::Observe(int type,
DCHECK(database_logging_enabled_);
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED: {
+ case extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED: {
AddExtensionEvent(
EVENT_EXTENSION_INSTALL,
content::Details<const extensions::InstalledExtensionInfo>(details)->
extension);
break;
}
- case chrome::NOTIFICATION_EXTENSION_ENABLED: {
+ case extensions::NOTIFICATION_EXTENSION_ENABLED: {
AddExtensionEvent(EVENT_EXTENSION_ENABLE,
content::Details<Extension>(details).ptr());
break;
}
- case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
+ case extensions::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: {
const UnloadedExtensionInfo* info =
content::Details<UnloadedExtensionInfo>(details).ptr();
@@ -579,7 +583,7 @@ void PerformanceMonitor::Observe(int type,
}
break;
}
- case chrome::NOTIFICATION_CRX_INSTALLER_DONE: {
+ case extensions::NOTIFICATION_CRX_INSTALLER_DONE: {
const extensions::CrxInstaller* installer =
content::Source<extensions::CrxInstaller>(source).ptr();
const extensions::Extension* extension =
@@ -593,7 +597,7 @@ void PerformanceMonitor::Observe(int type,
}
break;
}
- case chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED: {
+ case extensions::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED: {
AddExtensionEvent(EVENT_EXTENSION_UNINSTALL,
content::Details<Extension>(details).ptr());
break;

Powered by Google App Engine
This is Rietveld 408576698