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

Side by Side Diff: content/browser/geolocation/geolocation_dispatcher_host.cc

Issue 226103003: Log ErrorCode of Geoposition to UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698