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

Unified Diff: extensions/browser/event_router.h

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 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
« no previous file with comments | « extensions/browser/event_listener_map_unittest.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/event_router.h
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h
index b9af93aef3e402644505b597e888e5a1ff602198..8164d91523b901d56624a39e679a2ee8908e17dc 100644
--- a/extensions/browser/event_router.h
+++ b/extensions/browser/event_router.h
@@ -22,6 +22,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/render_process_host_observer.h"
#include "extensions/browser/event_listener_map.h"
+#include "extensions/browser/extension_event_histogram_value.h"
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/common/event_filtering_info.h"
#include "ipc/ipc_sender.h"
@@ -335,6 +336,11 @@ struct Event {
const Extension*,
base::ListValue*)> WillDispatchCallback;
+ // The identifier for the event, for histograms. In most cases this
+ // correlates 1:1 with |event_name|, in some cases events will generate
+ // their own names, but they cannot generate their own identifier.
+ events::HistogramValue histogram_value;
+
// The event to dispatch.
std::string event_name;
@@ -366,14 +372,17 @@ struct Event {
// this event to be dispatched to non-extension processes, like WebUI.
WillDispatchCallback will_dispatch_callback;
- Event(const std::string& event_name,
+ Event(events::HistogramValue histogram_value,
+ const std::string& event_name,
scoped_ptr<base::ListValue> event_args);
- Event(const std::string& event_name,
+ Event(events::HistogramValue histogram_value,
+ const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_browser_context);
- Event(const std::string& event_name,
+ Event(events::HistogramValue histogram_value,
+ const std::string& event_name,
scoped_ptr<base::ListValue> event_args,
content::BrowserContext* restrict_to_browser_context,
const GURL& event_url,
« no previous file with comments | « extensions/browser/event_listener_map_unittest.cc ('k') | extensions/browser/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698