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

Unified Diff: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.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 | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
diff --git a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
index ee464629ed7c5adf9909283329a21befa748c75c..ca050ee958a9bee878a492f36a39e18c8b55c654 100644
--- a/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
+++ b/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc
@@ -832,10 +832,9 @@ LayoutTestBluetoothAdapterProvider::GetGenericAccessService(
BluetoothRemoteGattCharacteristic::PROPERTY_WRITE));
// Read response.
- std::string device_name_str = device->GetDeviceName();
- std::vector<uint8_t> device_name_value(device_name_str.begin(),
- device_name_str.end());
-
+ std::vector<uint8_t> device_name_value;
+ if (base::Optional<std::string> name = device->GetName())
+ device_name_value.assign(name.value().begin(), name.value().end());
ON_CALL(*device_name, ReadRemoteCharacteristic(_, _))
.WillByDefault(RunCallback<0>(device_name_value));
« no previous file with comments | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698