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

Side by Side Diff: content/browser/bluetooth/bluetooth_metrics.cc

Issue 2789243002: Rename BluetoothScanFilterInit to BluetoothLEScanFilterInit (Closed)
Patch Set: Codereview: nit Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/bluetooth/bluetooth_metrics.h" 5 #include "content/browser/bluetooth/bluetooth_metrics.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // requestDevice() 55 // requestDevice()
56 56
57 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome) { 57 void RecordRequestDeviceOutcome(UMARequestDeviceOutcome outcome) {
58 UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.RequestDevice.Outcome", 58 UMA_HISTOGRAM_ENUMERATION("Bluetooth.Web.RequestDevice.Outcome",
59 static_cast<int>(outcome), 59 static_cast<int>(outcome),
60 static_cast<int>(UMARequestDeviceOutcome::COUNT)); 60 static_cast<int>(UMARequestDeviceOutcome::COUNT));
61 } 61 }
62 62
63 static void RecordRequestDeviceFilters( 63 static void RecordRequestDeviceFilters(
64 const std::vector<blink::mojom::WebBluetoothScanFilterPtr>& filters) { 64 const std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>& filters) {
65 UMA_HISTOGRAM_COUNTS_100("Bluetooth.Web.RequestDevice.Filters.Count", 65 UMA_HISTOGRAM_COUNTS_100("Bluetooth.Web.RequestDevice.Filters.Count",
66 filters.size()); 66 filters.size());
67 for (const auto& filter : filters) { 67 for (const auto& filter : filters) {
68 if (!filter->services) { 68 if (!filter->services) {
69 continue; 69 continue;
70 } 70 }
71 UMA_HISTOGRAM_COUNTS_100("Bluetooth.Web.RequestDevice.FilterSize", 71 UMA_HISTOGRAM_COUNTS_100("Bluetooth.Web.RequestDevice.FilterSize",
72 filter->services->size()); 72 filter->services->size());
73 for (const BluetoothUUID& service : filter->services.value()) { 73 for (const BluetoothUUID& service : filter->services.value()) {
74 // TODO(ortuno): Use a macro to histogram strings. 74 // TODO(ortuno): Use a macro to histogram strings.
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) { 446 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) {
447 if (!accept_all_devices) { 447 if (!accept_all_devices) {
448 UMA_HISTOGRAM_SPARSE_SLOWLY( 448 UMA_HISTOGRAM_SPARSE_SLOWLY(
449 "Bluetooth.Web.RequestDevice." 449 "Bluetooth.Web.RequestDevice."
450 "NumOfDevicesInChooserWhenNotAcceptingAllDevices", 450 "NumOfDevicesInChooserWhenNotAcceptingAllDevices",
451 std::min(num_of_devices, kMaxNumOfDevices)); 451 std::min(num_of_devices, kMaxNumOfDevices));
452 } 452 }
453 } 453 }
454 454
455 } // namespace content 455 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698