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

Unified Diff: device/bluetooth/bluetooth_low_energy_win.cc

Issue 2009753002: bluetooth: Make public BluetoothDevice::GetName method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out name/alias Created 4 years, 5 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
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_win.h ('k') | device/bluetooth/bluetooth_task_manager_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_win.cc
diff --git a/device/bluetooth/bluetooth_low_energy_win.cc b/device/bluetooth/bluetooth_low_energy_win.cc
index b96277c18304793884ede9fdf120e52dde686a4e..77cfc225312f13a6495d468122675bdad817ff60 100644
--- a/device/bluetooth/bluetooth_low_energy_win.cc
+++ b/device/bluetooth/bluetooth_low_energy_win.cc
@@ -467,14 +467,10 @@ bool CollectBluetoothLowEnergyDeviceInfo(
device_info_handle, &device_info_data, result, error)) {
return false;
}
- if (!CollectBluetoothLowEnergyDeviceFriendlyName(
- device_info_handle, &device_info_data, result, error)) {
- // Only fail if not the GATT service device interface, which doesn't have a
- // friendly name.
- if (device_interface_data->InterfaceClassGuid !=
- GUID_BLUETOOTH_GATT_SERVICE_DEVICE_INTERFACE)
- return false;
- }
+ // Get the friendly name. If it fails it is OK to leave the
+ // device_info_data.friendly_name as nullopt indicating the name not read.
+ CollectBluetoothLowEnergyDeviceFriendlyName(device_info_handle,
+ &device_info_data, result, error);
if (!CollectBluetoothLowEnergyDeviceAddress(
device_info_handle, &device_info_data, result, error)) {
return false;
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_win.h ('k') | device/bluetooth/bluetooth_task_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698