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

Unified Diff: device/bluetooth/bluetooth_task_manager_win.cc

Issue 14273013: Simplified BluetoothAdapterWin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed ScopedPtr Created 7 years, 8 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 885265182a0dd98896391b7ff327fc4a920714c0..2fca0717f37191ae2209f7a9f039596c1ea48638 100644
--- a/device/bluetooth/bluetooth_task_manager_win.cc
+++ b/device/bluetooth/bluetooth_task_manager_win.cc
@@ -188,6 +188,13 @@ void BluetoothTaskManagerWin::OnDiscoveryStopped() {
DiscoveryStopped());
}
+void BluetoothTaskManagerWin::OnDevicesUpdated(
+ const ScopedVector<DeviceState>* devices) {
+ DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
+ FOR_EACH_OBSERVER(BluetoothTaskManagerWin::Observer, observers_,
+ DevicesUpdated(*devices));
+}
+
void BluetoothTaskManagerWin::OnDevicesDiscovered(
const ScopedVector<DeviceState>* devices) {
DCHECK(ui_task_runner_->RunsTasksOnCurrentThread());
@@ -321,7 +328,7 @@ void BluetoothTaskManagerWin::GetKnownDevices() {
DiscoverServices(device_list);
ui_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&BluetoothTaskManagerWin::OnDevicesDiscovered,
+ base::Bind(&BluetoothTaskManagerWin::OnDevicesUpdated,
this,
base::Owned(device_list)));
}
@@ -333,7 +340,7 @@ void BluetoothTaskManagerWin::SearchDevices(
BLUETOOTH_DEVICE_SEARCH_PARAMS device_search_params = {
sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS),
1, // return authenticated devices
- 1, // return remembered devices
+ 1, // return remembered devicess
search_cached_devices_only ? 0 : 1, // return unknown devices
1, // return connected devices
search_cached_devices_only ? 0 : 1, // issue a new inquiry

Powered by Google App Engine
This is Rietveld 408576698