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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_api.cc

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
Index: chrome/browser/extensions/api/omnibox/omnibox_api.cc
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
index b8b1ee889952369605cc10ac26ad6b35cc7f418f..e403c877c097c6a73254ca7e3ea866e93019fa3d 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
@@ -99,9 +99,9 @@ std::string GetTemplateURLStringForExtension(const std::string& extension_id) {
// static
void ExtensionOmniboxEventRouter::OnInputStarted(
Profile* profile, const std::string& extension_id) {
- scoped_ptr<Event> event(new Event(
- omnibox::OnInputStarted::kEventName,
- make_scoped_ptr(new base::ListValue())));
+ scoped_ptr<Event> event(new Event(events::UNKNOWN,
+ omnibox::OnInputStarted::kEventName,
+ make_scoped_ptr(new base::ListValue())));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
->DispatchEventToExtension(extension_id, event.Pass());
@@ -120,8 +120,8 @@ bool ExtensionOmniboxEventRouter::OnInputChanged(
args->Set(0, new base::StringValue(input));
args->Set(1, new base::FundamentalValue(suggest_id));
- scoped_ptr<Event> event(new Event(omnibox::OnInputChanged::kEventName,
- args.Pass()));
+ scoped_ptr<Event> event(new Event(
+ events::UNKNOWN, omnibox::OnInputChanged::kEventName, args.Pass()));
event->restrict_to_browser_context = profile;
event_router->DispatchEventToExtension(extension_id, event.Pass());
return true;
@@ -152,8 +152,8 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
else
args->Set(1, new base::StringValue(kCurrentTabDisposition));
- scoped_ptr<Event> event(new Event(omnibox::OnInputEntered::kEventName,
- args.Pass()));
+ scoped_ptr<Event> event(new Event(
+ events::UNKNOWN, omnibox::OnInputEntered::kEventName, args.Pass()));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
->DispatchEventToExtension(extension_id, event.Pass());
@@ -167,9 +167,9 @@ void ExtensionOmniboxEventRouter::OnInputEntered(
// static
void ExtensionOmniboxEventRouter::OnInputCancelled(
Profile* profile, const std::string& extension_id) {
- scoped_ptr<Event> event(new Event(
- omnibox::OnInputCancelled::kEventName,
- make_scoped_ptr(new base::ListValue())));
+ scoped_ptr<Event> event(new Event(events::UNKNOWN,
+ omnibox::OnInputCancelled::kEventName,
+ make_scoped_ptr(new base::ListValue())));
event->restrict_to_browser_context = profile;
EventRouter::Get(profile)
->DispatchEventToExtension(extension_id, event.Pass());

Powered by Google App Engine
This is Rietveld 408576698