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

Unified Diff: device/bluetooth/bluetooth_classic_win.cc

Issue 1672843002: Implement fake Bluetooth adapter for BluetoothTest.ConstructFakeAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move ScopedHandle from task manager to low level code Created 4 years, 10 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: device/bluetooth/bluetooth_classic_win.cc
diff --git a/device/bluetooth/bluetooth_classic_win.cc b/device/bluetooth/bluetooth_classic_win.cc
index 2f19cb1bb9f206ded6ed465644cb9c17c2492896..18e2f3660adfce03dca97d25767b2e4d3d4a440a 100644
--- a/device/bluetooth/bluetooth_classic_win.cc
+++ b/device/bluetooth/bluetooth_classic_win.cc
@@ -35,7 +35,16 @@ BluetoothClassicWrapper::~BluetoothClassicWrapper() {}
HBLUETOOTH_RADIO_FIND BluetoothClassicWrapper::FindFirstRadio(
const BLUETOOTH_FIND_RADIO_PARAMS* params,
HANDLE* out_handle) {
- return BluetoothFindFirstRadio(params, out_handle);
+ HANDLE radio_handle = NULL;
+ HBLUETOOTH_RADIO_FIND radio_find_handle =
+ BluetoothFindFirstRadio(params, &radio_handle);
+ if (radio_find_handle) {
+ if (opened_radio_handle_.IsValid())
scheib 2016/02/07 01:45:18 .Set() performs Close (and in that, IsValid). So j
gogerald1 2016/02/08 17:00:04 Done.
+ opened_radio_handle_.Close();
+ opened_radio_handle_.Set(radio_handle);
+ *out_handle = opened_radio_handle_.Get();
+ }
+ return radio_find_handle;
}
DWORD BluetoothClassicWrapper::GetRadioInfo(

Powered by Google App Engine
This is Rietveld 408576698