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/network_location_request.h" | 5 #include "content/browser/geolocation/network_location_request.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 event, NETWORK_LOCATION_REQUEST_EVENT_COUNT); | 53 event, NETWORK_LOCATION_REQUEST_EVENT_COUNT); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void RecordUmaResponseCode(int code) { | 56 void RecordUmaResponseCode(int code) { |
| 57 UMA_HISTOGRAM_SPARSE_SLOWLY("Geolocation.NetworkLocationRequest.ResponseCode", | 57 UMA_HISTOGRAM_SPARSE_SLOWLY("Geolocation.NetworkLocationRequest.ResponseCode", |
| 58 code); | 58 code); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void RecordUmaAccessPoints(int count) { | 61 void RecordUmaAccessPoints(int count) { |
| 62 const int min = 0; | 62 const int min = 0; |
| 63 const int max = 10; | 63 const int max = 20; |
| 64 const int buckets = 11; | 64 const int buckets = 21; |
|
timvolodine
2013/10/25 13:45:54
maybe add in the description why you are doing thi
Michael van Ouwerkerk
2013/10/25 13:49:46
Done.
| |
| 65 UMA_HISTOGRAM_CUSTOM_COUNTS("Geolocation.NetworkLocationRequest.AccessPoints", | 65 UMA_HISTOGRAM_CUSTOM_COUNTS("Geolocation.NetworkLocationRequest.AccessPoints", |
| 66 count, min, max, buckets); | 66 count, min, max, buckets); |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Local functions | 69 // Local functions |
| 70 // Creates the request url to send to the server. | 70 // Creates the request url to send to the server. |
| 71 GURL FormRequestURL(const GURL& url); | 71 GURL FormRequestURL(const GURL& url); |
| 72 | 72 |
| 73 void FormUploadData(const WifiData& wifi_data, | 73 void FormUploadData(const WifiData& wifi_data, |
| 74 const base::Time& timestamp, | 74 const base::Time& timestamp, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 | 422 |
| 423 // Other fields are optional. | 423 // Other fields are optional. |
| 424 GetAsDouble(*response_object, kAccuracyString, &position->accuracy); | 424 GetAsDouble(*response_object, kAccuracyString, &position->accuracy); |
| 425 | 425 |
| 426 return true; | 426 return true; |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace | 429 } // namespace |
| 430 | 430 |
| 431 } // namespace content | 431 } // namespace content |
| OLD | NEW |