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

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

Issue 2590333002: Fix UMA for the number of devices in the chooser when a device is paired (Closed)
Patch Set: fix UMA for the number of devices in the chooser when a device is paired Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698