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

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

Issue 2030973002: bluetooth: Handle two consecutives requestDevice calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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 16a3630a279531bd04e2738d10730221c5675934..15319c84ca00e33f9f47b4f5752f5ded03be3189 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -218,7 +218,11 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController(
CHECK(adapter_);
}
-BluetoothDeviceChooserController::~BluetoothDeviceChooserController() {}
+BluetoothDeviceChooserController::~BluetoothDeviceChooserController() {
+ if (chooser_) {
+ error_callback_.Run(blink::mojom::WebBluetoothError::CHOOSER_CANCELLED);
Jeffrey Yasskin 2016/06/10 00:49:22 DCHECK(!error_callback_.is_null())? It'll crash in
ortuno 2016/06/10 18:10:07 Done.
+ }
+}
void BluetoothDeviceChooserController::GetDevice(
blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,

Powered by Google App Engine
This is Rietveld 408576698