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

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

Issue 10694056: CPM Extension Uninstall Watching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 16d15170b31652d9e367782d0e606c33c81162de..afa5b2b91ee4e7ce1327bd5695dc54ee8cc2c282 100644
--- a/chrome/browser/performance_monitor/performance_monitor.cc
+++ b/chrome/browser/performance_monitor/performance_monitor.cc
@@ -69,6 +69,8 @@ void PerformanceMonitor::RegisterForNotifications() {
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE,
content::NotificationService::AllSources());
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
+ content::NotificationService::AllSources());
}
// Static
@@ -185,7 +187,7 @@ void PerformanceMonitor::Observe(int type,
}
case chrome::NOTIFICATION_CRX_INSTALLER_DONE: {
const CrxInstaller* installer =
- content::Source<CrxInstaller>(source).ptr();
+ content::Source<CrxInstaller>(source).ptr();
// Check if the reason for the install was due to an extension update.
if (installer->install_cause() != extension_misc::INSTALL_CAUSE_UPDATE)
@@ -201,6 +203,17 @@ void PerformanceMonitor::Observe(int type,
extension->description()));
break;
}
+ case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: {
+ const Extension* extension = content::Details<Extension>(details).ptr();
+ AddEvent(util::CreateExtensionUninstallEvent(base::Time::Now(),
+ extension->id(),
+ extension->name(),
+ extension->url().spec(),
+ extension->location(),
+ extension->VersionString(),
+ extension->description()));
+ break;
+ }
default: {
NOTREACHED();
break;

Powered by Google App Engine
This is Rietveld 408576698