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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2601773003: Fix the logic of counting the number of devices for Web Bluetooth chooser UMA (Closed)
Patch Set: fix the logic of counting the number of devices for Web Bluetooth chooser UMA 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index 5457be97a116c69ecb270aee6d659530225c0bb8..19cad9b7c8ea02382046bf52fcc3db903a22a406 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -408,6 +408,7 @@ void BluetoothDeviceChooserController::GetDevice(
return;
}
+ device_ids_.clear();
PopulateConnectedDevices();
if (!chooser_.get()) {
// If the dialog's closing, no need to do any of the rest of this.
@@ -505,8 +506,6 @@ void BluetoothDeviceChooserController::StartDeviceDiscovery() {
return;
}
- device_ids_.clear();
-
scanning_start_time_ = base::TimeTicks::Now();
chooser_->ShowDiscoveryState(BluetoothChooser::DiscoveryState::DISCOVERING);
@@ -564,6 +563,7 @@ void BluetoothDeviceChooserController::OnBluetoothChooserEvent(
switch (event) {
case BluetoothChooser::Event::RESCAN:
RecordRequestDeviceOutcome(OutcomeFromChooserEvent(event));
+ device_ids_.clear();
PopulateConnectedDevices();
DCHECK(chooser_);
StartDeviceDiscovery();
« 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