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

Unified Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.cc

Issue 2017393002: bluetooth: Rename device's GetName to GetNameForDisplay (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: content/browser/bluetooth/bluetooth_device_chooser_controller.cc
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index dc255a8e9afd601d84c9cb6cfe9969474fefb0eb..57db5b5d2a339165f4359f5b561665d1716a2828 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -101,7 +101,8 @@ bool MatchesFilter(const device::BluetoothDevice& device,
const blink::mojom::WebBluetoothScanFilterPtr& filter) {
DCHECK(!IsEmptyOrInvalidFilter(filter));
- const std::string device_name = base::UTF16ToUTF8(device.GetName());
+ // TODO(615720): Use the upcoming GetName (was GetDeviceName).
+ const std::string device_name = base::UTF16ToUTF8(device.GetNameForDisplay());
if (!filter->name.is_null() && (device_name != filter->name)) {
return false;
@@ -351,7 +352,7 @@ void BluetoothDeviceChooserController::AddFilteredDevice(
const device::BluetoothDevice& device) {
if (chooser_.get() && MatchesFilters(device, options_->filters)) {
VLOG(1) << "Adding device to chooser: " << device.GetAddress();
- chooser_->AddDevice(device.GetAddress(), device.GetName());
+ chooser_->AddDevice(device.GetAddress(), device.GetNameForDisplay());
}
}

Powered by Google App Engine
This is Rietveld 408576698