Chromium Code Reviews| 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; |