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

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: Latest master for cq Created 8 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 66e1575a837a9f0dd6c82c0cd74faba7f7c69fcd..7e6122f45297ed4ec8fd34da2ebda48ea09d9b7a 100644
--- a/chrome/browser/performance_monitor/performance_monitor.cc
+++ b/chrome/browser/performance_monitor/performance_monitor.cc
@@ -96,6 +96,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());
// Crashes
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_HANG,
@@ -204,7 +206,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)
@@ -220,6 +222,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;
+ }
case content::NOTIFICATION_RENDERER_PROCESS_HANG: {
content::WebContents* contents =
content::Source<content::WebContents>(source).ptr();
« no previous file with comments | « chrome/browser/extensions/state_store.cc ('k') | chrome/browser/performance_monitor/performance_monitor_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698