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

Unified Diff: chrome/browser/extensions/api/location/location_manager.cc

Issue 1236493004: Final batch adding real histogram values for extension events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android compile Created 5 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/extensions/api/location/location_manager.cc
diff --git a/chrome/browser/extensions/api/location/location_manager.cc b/chrome/browser/extensions/api/location/location_manager.cc
index a5cd40f90f3019f4f3a555c8a924ef883105baeb..e3015a72fe90b36b2e401ce6a1784e0703d02476 100644
--- a/chrome/browser/extensions/api/location/location_manager.cc
+++ b/chrome/browser/extensions/api/location/location_manager.cc
@@ -313,6 +313,7 @@ void LocationManager::SendLocationUpdate(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
scoped_ptr<base::ListValue> args(new base::ListValue());
+ events::HistogramValue histogram_value = events::UNKNOWN;
std::string event_name;
if (position.Validate() &&
@@ -324,15 +325,17 @@ void LocationManager::SendLocationUpdate(
location.timestamp = position.timestamp.ToJsTime();
args->Append(location.ToValue().release());
+ histogram_value = events::LOCATION_ON_LOCATION_UPDATE;
event_name = location::OnLocationUpdate::kEventName;
} else {
// Set data for onLocationError event.
// TODO(vadimt): Set name.
args->AppendString(position.error_message);
+ histogram_value = events::LOCATION_ON_LOCATION_ERROR;
event_name = location::OnLocationError::kEventName;
}
- scoped_ptr<Event> event(new Event(events::UNKNOWN, event_name, args.Pass()));
+ scoped_ptr<Event> event(new Event(histogram_value, event_name, args.Pass()));
EventRouter::Get(browser_context_)
->DispatchEventToExtension(extension_id, event.Pass());

Powered by Google App Engine
This is Rietveld 408576698