summaryrefslogtreecommitdiffstats
path: root/extensions/browser/api/app_runtime
diff options
context:
space:
mode:
authorkalman <kalman@chromium.org>2015-07-06 15:18:33 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-06 22:20:13 +0000
commitef20c65b2dc4f91486f56f6a74d5df46062e9f1b (patch)
tree046463a99ecc895d0a5b347887eca10f18019c60 /extensions/browser/api/app_runtime
parent4b46e72bba0a62e8a7b7720ec444fb7cb19c8653 (diff)
downloadchromium_src-ef20c65b2dc4f91486f56f6a74d5df46062e9f1b.zip
chromium_src-ef20c65b2dc4f91486f56f6a74d5df46062e9f1b.tar.gz
chromium_src-ef20c65b2dc4f91486f56f6a74d5df46062e9f1b.tar.bz2
Second batch adding real histogram values for extension events.
BUG=503402 R=rdevlin.cronin@chromium.org, isherman@chromium.org TBR=stevenjb@chromium.org,dmazzoni@chromium.org,ckehoe@chromium.org Review URL: https://codereview.chromium.org/1221643019 Cr-Commit-Position: refs/heads/master@{#337495}
Diffstat (limited to 'extensions/browser/api/app_runtime')
-rw-r--r--extensions/browser/api/app_runtime/app_runtime_api.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/extensions/browser/api/app_runtime/app_runtime_api.cc b/extensions/browser/api/app_runtime/app_runtime_api.cc
index 7839b72..e393c1d 100644
--- a/extensions/browser/api/app_runtime/app_runtime_api.cc
+++ b/extensions/browser/api/app_runtime/app_runtime_api.cc
@@ -30,8 +30,9 @@ void DispatchOnEmbedRequestedEventImpl(
content::BrowserContext* context) {
scoped_ptr<base::ListValue> args(new base::ListValue());
args->Append(app_embedding_request_data.release());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnEmbedRequested::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_EMBED_REQUESTED,
+ app_runtime::OnEmbedRequested::kEventName,
+ args.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventWithLazyListener(extension_id, event.Pass());
@@ -53,8 +54,9 @@ void DispatchOnLaunchedEventImpl(const std::string& extension_id,
ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode());
scoped_ptr<base::ListValue> args(new base::ListValue());
args->Append(launch_data.release());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnLaunched::kEventName, args.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_LAUNCHED,
+ app_runtime::OnLaunched::kEventName,
+ args.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventWithLazyListener(extension_id, event.Pass());
@@ -138,8 +140,9 @@ void AppRuntimeEventRouter::DispatchOnRestartedEvent(
BrowserContext* context,
const Extension* extension) {
scoped_ptr<base::ListValue> arguments(new base::ListValue());
- scoped_ptr<Event> event(new Event(
- events::UNKNOWN, app_runtime::OnRestarted::kEventName, arguments.Pass()));
+ scoped_ptr<Event> event(new Event(events::APP_RUNTIME_ON_RESTARTED,
+ app_runtime::OnRestarted::kEventName,
+ arguments.Pass()));
event->restrict_to_browser_context = context;
EventRouter::Get(context)
->DispatchEventToExtension(extension->id(), event.Pass());