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

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

Issue 2059543002: bluetooth: Move FactoryWrapper to device and expose a function for testing in chooser controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix typo 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..278510b71d649357b7aaebd88bb7c08efe1c085d 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -198,8 +198,7 @@ UMARequestDeviceOutcome OutcomeFromChooserEvent(BluetoothChooser::Event event) {
BluetoothDeviceChooserController::BluetoothDeviceChooserController(
WebBluetoothServiceImpl* web_bluetooth_service,
RenderFrameHost* render_frame_host,
- device::BluetoothAdapter* adapter,
- base::TimeDelta scan_duration)
+ device::BluetoothAdapter* adapter)
: adapter_(adapter),
web_bluetooth_service_(web_bluetooth_service),
render_frame_host_(render_frame_host),
@@ -208,7 +207,7 @@ BluetoothDeviceChooserController::BluetoothDeviceChooserController(
FROM_HERE,
// TODO(jyasskin): Add a way for tests to control the dialog
// directly, and change this to a reasonable discovery timeout.
- scan_duration,
+ GetContentClient()->browser()->GetBluetoothScanDuration(),
base::Bind(&BluetoothDeviceChooserController::StopDeviceDiscovery,
// base::Timer guarantees it won't call back after its
// destructor starts.

Powered by Google App Engine
This is Rietveld 408576698