summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkalman <kalman@chromium.org>2015-03-16 15:30:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-16 22:31:35 +0000
commitfd474faa8e4f90615bee3b1da22cd4c1d38c5ef2 (patch)
tree14ef406e10e4edb02ffe611d1645cda22b4f80cb /apps
parent8f2fd17e33f365c1a73dd25aa33a3a2877d0c1d5 (diff)
downloadchromium_src-fd474faa8e4f90615bee3b1da22cd4c1d38c5ef2.zip
chromium_src-fd474faa8e4f90615bee3b1da22cd4c1d38c5ef2.tar.gz
chromium_src-fd474faa8e4f90615bee3b1da22cd4c1d38c5ef2.tar.bz2
Make LoadMonitoringExtensionHostQueue remove itself as an ExtensionHost observer at the correct time.
"Extensions.ExtensionHostMonitoring.NumLoaded" UMA is now correctly recorded. I also cleaned up ExtensionHost and its Start/Stop events a little to make it more obvious, but in a way that my previous attempt at this (r320536) won't cause crashes. R=yoz@chromium.org TBR=sky@chromium.org Review URL: https://codereview.chromium.org/1016473002 Cr-Commit-Position: refs/heads/master@{#320806}
Diffstat (limited to 'apps')
-rw-r--r--apps/app_lifetime_monitor.cc4
-rw-r--r--apps/app_load_service.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_lifetime_monitor.cc b/apps/app_lifetime_monitor.cc
index 3190e29..6051f0c 100644
--- a/apps/app_lifetime_monitor.cc
+++ b/apps/app_lifetime_monitor.cc
@@ -23,7 +23,7 @@ using extensions::ExtensionHost;
AppLifetimeMonitor::AppLifetimeMonitor(Profile* profile)
: profile_(profile) {
registrar_.Add(this,
- extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
+ extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_FIRST_LOAD,
content::NotificationService::AllSources());
registrar_.Add(this,
extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
@@ -53,7 +53,7 @@ void AppLifetimeMonitor::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING: {
+ case extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_FIRST_LOAD: {
ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
const Extension* extension = host->extension();
if (!extension || !extension->is_platform_app())
diff --git a/apps/app_load_service.cc b/apps/app_load_service.cc
index c4d308e..eb4b5c6 100644
--- a/apps/app_load_service.cc
+++ b/apps/app_load_service.cc
@@ -35,7 +35,7 @@ AppLoadService::PostReloadAction::PostReloadAction()
AppLoadService::AppLoadService(Profile* profile)
: profile_(profile) {
registrar_.Add(this,
- extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING,
+ extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_FIRST_LOAD,
content::NotificationService::AllSources());
extensions::ExtensionRegistry::Get(profile_)->AddObserver(this);
}
@@ -93,7 +93,7 @@ AppLoadService* AppLoadService::Get(Profile* profile) {
void AppLoadService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING);
+ DCHECK_EQ(type, extensions::NOTIFICATION_EXTENSION_HOST_DID_STOP_FIRST_LOAD);
extensions::ExtensionHost* host =
content::Details<extensions::ExtensionHost>(details).ptr();
const Extension* extension = host->extension();