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

Unified Diff: device/bluetooth/bluetooth_task_manager_win.cc

Issue 1676073002: Implement BluetoothLowEnergyWrapperFake for Bluetooth test fixture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_task_manager_win.cc
diff --git a/device/bluetooth/bluetooth_task_manager_win.cc b/device/bluetooth/bluetooth_task_manager_win.cc
index a996cf348c2d28082b6f88057ff06e1f717a5e3f..8d9f6862a82917eed6e2d2e7ad3eb92e89fbc10a 100644
--- a/device/bluetooth/bluetooth_task_manager_win.cc
+++ b/device/bluetooth/bluetooth_task_manager_win.cc
@@ -443,7 +443,7 @@ bool BluetoothTaskManagerWin::SearchClassicDevices(
win::BluetoothClassicWrapper::GetInstance()->FindFirstDevice(
&device_search_params, &device_info);
if (!handle) {
- int last_error = GetLastError();
+ int last_error = win::BluetoothClassicWrapper::GetInstance()->LastError();
scheib 2016/02/07 02:24:08 BTW, looking at how often ::GetInstance is being c
gogerald1 2016/02/08 19:23:51 Acknowledged.
if (last_error == ERROR_NO_MORE_ITEMS) {
return true; // No devices is not an error.
}
@@ -461,7 +461,7 @@ bool BluetoothTaskManagerWin::SearchClassicDevices(
device_info.dwSize = sizeof(BLUETOOTH_DEVICE_INFO);
if (!win::BluetoothClassicWrapper::GetInstance()->FindNextDevice(
handle, &device_info)) {
- int last_error = GetLastError();
+ int last_error = win::BluetoothClassicWrapper::GetInstance()->LastError();
if (last_error == ERROR_NO_MORE_ITEMS) {
break; // No more items is expected error when done enumerating.
}
@@ -472,7 +472,8 @@ bool BluetoothTaskManagerWin::SearchClassicDevices(
}
if (!win::BluetoothClassicWrapper::GetInstance()->FindDeviceClose(handle)) {
- LogPollingError("Error calling BluetoothFindDeviceClose", GetLastError());
+ LogPollingError("Error calling BluetoothFindDeviceClose",
+ win::BluetoothClassicWrapper::GetInstance()->LastError());
return false;
}
return true;

Powered by Google App Engine
This is Rietveld 408576698