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

Unified Diff: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc

Issue 2769553002: cros: Clean up TrayBluetoothHelper todos (Closed)
Patch Set: test Created 3 years, 9 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: ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
diff --git a/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
index 3ee07f53c57fe8c61c914b216eb17c5dc6eb7afc..9af326d6df1d0b2c2b02192cc82bb90b226cd724 100644
--- a/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
+++ b/ash/common/system/chromeos/bluetooth/tray_bluetooth_helper.cc
@@ -60,10 +60,9 @@ void TrayBluetoothHelper::InitializeOnAdapterReady(
adapter_->AddObserver(this);
}
-void TrayBluetoothHelper::GetAvailableBluetoothDevices(
- std::vector<BluetoothDeviceInfo>* list) {
- device::BluetoothAdapter::DeviceList devices = adapter_->GetDevices();
- for (device::BluetoothDevice* device : devices) {
+BluetoothDeviceList TrayBluetoothHelper::GetAvailableBluetoothDevices() const {
+ BluetoothDeviceList list;
+ for (device::BluetoothDevice* device : adapter_->GetDevices()) {
BluetoothDeviceInfo info;
info.address = device->GetAddress();
info.display_name = device->GetNameForDisplay();
@@ -71,8 +70,9 @@ void TrayBluetoothHelper::GetAvailableBluetoothDevices(
info.connecting = device->IsConnecting();
info.paired = device->IsPaired();
info.device_type = device->GetDeviceType();
- list->push_back(info);
+ list.push_back(info);
}
+ return list;
}
void TrayBluetoothHelper::StartBluetoothDiscovering() {

Powered by Google App Engine
This is Rietveld 408576698