OLD | NEW |
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 } | 351 } |
352 | 352 |
353 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level) { | 353 void RecordRSSISignalStrengthLevel(UMARSSISignalStrengthLevel level) { |
354 UMA_HISTOGRAM_ENUMERATION( | 354 UMA_HISTOGRAM_ENUMERATION( |
355 "Bluetooth.Web.RequestDevice.RSSISignalStrengthLevel", | 355 "Bluetooth.Web.RequestDevice.RSSISignalStrengthLevel", |
356 static_cast<int>(level), | 356 static_cast<int>(level), |
357 static_cast<int>(UMARSSISignalStrengthLevel::COUNT)); | 357 static_cast<int>(UMARSSISignalStrengthLevel::COUNT)); |
358 } | 358 } |
359 | 359 |
360 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) { | 360 void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) { |
361 if (accept_all_devices) { | 361 if (!accept_all_devices) { |
362 UMA_HISTOGRAM_SPARSE_SLOWLY( | 362 UMA_HISTOGRAM_SPARSE_SLOWLY( |
363 "Bluetooth.Web.RequestDevice." | 363 "Bluetooth.Web.RequestDevice." |
364 "NumOfDevicesInChooserWhenNotAcceptingAllDevices", | 364 "NumOfDevicesInChooserWhenNotAcceptingAllDevices", |
365 std::min(num_of_devices, kMaxNumOfDevices)); | 365 std::min(num_of_devices, kMaxNumOfDevices)); |
366 } | 366 } |
367 } | 367 } |
368 | 368 |
369 } // namespace content | 369 } // namespace content |
OLD | NEW |