| 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());
|
|
|