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

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 2244703005: arc: bluetooth: Fix advertised uuid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/arc/bluetooth/arc_bluetooth_bridge.h" 5 #include "components/arc/bluetooth/arc_bluetooth_bridge.h"
6 6
7 #include <bluetooth/bluetooth.h> 7 #include <bluetooth/bluetooth.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 mojo::Array<mojom::BluetoothAdvertisingDataPtr> advertising_data; 1535 mojo::Array<mojom::BluetoothAdvertisingDataPtr> advertising_data;
1536 1536
1537 // LocalName 1537 // LocalName
1538 mojom::BluetoothAdvertisingDataPtr local_name = 1538 mojom::BluetoothAdvertisingDataPtr local_name =
1539 mojom::BluetoothAdvertisingData::New(); 1539 mojom::BluetoothAdvertisingData::New();
1540 local_name->set_local_name(device->GetName() ? device->GetName().value() 1540 local_name->set_local_name(device->GetName() ? device->GetName().value()
1541 : nullptr); 1541 : nullptr);
1542 advertising_data.push_back(std::move(local_name)); 1542 advertising_data.push_back(std::move(local_name));
1543 1543
1544 // ServiceUuid 1544 // ServiceUuid
1545 BluetoothDevice::UUIDList uuid_list = device->GetServiceDataUUIDs(); 1545 BluetoothDevice::UUIDList uuid_list = device->GetUUIDs();
ortuno 2016/08/15 15:46:57 There is more to fix in this function. I would rec
puthik_chromium 2016/08/15 21:19:01 Sorry. I was careless. Fixed.
1546 if (uuid_list.size() > 0) { 1546 if (uuid_list.size() > 0) {
1547 mojom::BluetoothAdvertisingDataPtr service_uuids = 1547 mojom::BluetoothAdvertisingDataPtr service_uuids =
1548 mojom::BluetoothAdvertisingData::New(); 1548 mojom::BluetoothAdvertisingData::New();
1549 service_uuids->set_service_uuids( 1549 service_uuids->set_service_uuids(
1550 mojo::Array<mojom::BluetoothUUIDPtr>::From(uuid_list)); 1550 mojo::Array<mojom::BluetoothUUIDPtr>::From(uuid_list));
1551 advertising_data.push_back(std::move(service_uuids)); 1551 advertising_data.push_back(std::move(service_uuids));
1552 } 1552 }
1553 1553
1554 // Service data 1554 // Service data
1555 for (auto& uuid : uuid_list) { 1555 for (auto& uuid : uuid_list) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 LOG(WARNING) << "Bluetooth instance is too old (version " << version 1662 LOG(WARNING) << "Bluetooth instance is too old (version " << version
1663 << ") need version " << version_need; 1663 << ") need version " << version_need;
1664 return false; 1664 return false;
1665 } 1665 }
1666 1666
1667 bool ArcBluetoothBridge::CalledOnValidThread() { 1667 bool ArcBluetoothBridge::CalledOnValidThread() {
1668 return thread_checker_.CalledOnValidThread(); 1668 return thread_checker_.CalledOnValidThread();
1669 } 1669 }
1670 1670
1671 } // namespace arc 1671 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698