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

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

Issue 2456613002: Remove BluetoothDevice.uuids attribute from WebBluetooth (Closed)
Patch Set: address more comment Created 4 years, 2 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 | content/renderer/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/web_bluetooth_service_impl.cc
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index 5f99b71533b0c3e78ad77607c9db3ddcc7882d8d..be23b45788f41cf9322399cde320e0b51a3343c3 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -784,12 +784,10 @@ void WebBluetoothServiceImpl::OnGetDeviceSuccess(
VLOG(1) << "Device: " << device->GetNameForDisplay();
VLOG(1) << "UUIDs: ";
- mojo::Array<mojo::String> filtered_uuids;
for (const BluetoothUUID& uuid : device->GetUUIDs()) {
ortuno 2016/10/26 22:44:56 Sorry I should have been clearer. GetUUIDs() is ve
juncai 2016/10/27 00:48:05 Done.
if (allowed_devices_map_.IsOriginAllowedToAccessService(
GetOrigin(), device_id_for_origin, uuid)) {
VLOG(1) << "\t Allowed: " << uuid.canonical_value();
- filtered_uuids.push_back(uuid.canonical_value());
} else {
VLOG(1) << "\t Not Allowed: " << uuid.canonical_value();
}
@@ -800,7 +798,6 @@ void WebBluetoothServiceImpl::OnGetDeviceSuccess(
device_ptr->id = device_id_for_origin;
device_ptr->name = device->GetName() ? mojo::String(device->GetName().value())
: mojo::String(nullptr);
- device_ptr->uuids = std::move(filtered_uuids);
RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS);
callback.Run(blink::mojom::WebBluetoothResult::SUCCESS,
« no previous file with comments | « no previous file | content/renderer/bluetooth/web_bluetooth_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698