Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 5 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 IPC_MESSAGE_HANDLER(GeolocationHostMsg_StartUpdating, OnStartUpdating) | 141 IPC_MESSAGE_HANDLER(GeolocationHostMsg_StartUpdating, OnStartUpdating) |
| 142 IPC_MESSAGE_HANDLER(GeolocationHostMsg_StopUpdating, OnStopUpdating) | 142 IPC_MESSAGE_HANDLER(GeolocationHostMsg_StopUpdating, OnStopUpdating) |
| 143 IPC_MESSAGE_UNHANDLED(handled = false) | 143 IPC_MESSAGE_UNHANDLED(handled = false) |
| 144 IPC_END_MESSAGE_MAP() | 144 IPC_END_MESSAGE_MAP() |
| 145 return handled; | 145 return handled; |
| 146 } | 146 } |
| 147 | 147 |
| 148 void GeolocationDispatcherHostImpl::OnLocationUpdate( | 148 void GeolocationDispatcherHostImpl::OnLocationUpdate( |
| 149 const Geoposition& geoposition) { | 149 const Geoposition& geoposition) { |
| 150 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 150 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 151 UMA_HISTOGRAM_ENUMERATION( | |
| 152 "Geolocation.GeolocationDispatcherHostImpl.ErrorCode", | |
| 153 geoposition.error_code, | |
| 154 Geoposition::ERROR_CODE_LAST); | |
|
Ilya Sherman
2014/04/04 21:55:47
I recommend against re-using an existing enumerati
Ilya Sherman
2014/04/04 21:55:47
For enumerated histograms, the final argument shou
Michael van Ouwerkerk
2014/04/07 14:02:35
Done.
Michael van Ouwerkerk
2014/04/07 14:02:35
Done.
| |
| 151 for (std::map<int, RendererGeolocationOptions>::iterator it = | 155 for (std::map<int, RendererGeolocationOptions>::iterator it = |
| 152 geolocation_renderers_.begin(); | 156 geolocation_renderers_.begin(); |
| 153 it != geolocation_renderers_.end(); ++it) { | 157 it != geolocation_renderers_.end(); ++it) { |
| 154 if (!(it->second.is_paused)) | 158 if (!(it->second.is_paused)) |
| 155 Send(new GeolocationMsg_PositionUpdated(it->first, geoposition)); | 159 Send(new GeolocationMsg_PositionUpdated(it->first, geoposition)); |
| 156 } | 160 } |
| 157 } | 161 } |
| 158 | 162 |
| 159 void GeolocationDispatcherHostImpl::OnRequestPermission( | 163 void GeolocationDispatcherHostImpl::OnRequestPermission( |
| 160 int render_view_id, | 164 int render_view_id, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 } | 300 } |
| 297 | 301 |
| 298 GeolocationDispatcherHost::GeolocationDispatcherHost() | 302 GeolocationDispatcherHost::GeolocationDispatcherHost() |
| 299 : BrowserMessageFilter(GeolocationMsgStart) { | 303 : BrowserMessageFilter(GeolocationMsgStart) { |
| 300 } | 304 } |
| 301 | 305 |
| 302 GeolocationDispatcherHost::~GeolocationDispatcherHost() { | 306 GeolocationDispatcherHost::~GeolocationDispatcherHost() { |
| 303 } | 307 } |
| 304 | 308 |
| 305 } // namespace content | 309 } // namespace content |
| OLD | NEW |