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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_api_utils.cc

Issue 2244693002: bluetooth: Refactor how we update based on Advertising Data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/bluetooth/bluetooth_api_utils.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
index f6b3b2caee158ba96544c01e141375a7bb8e2b78..7f5aa8d48a1a2b49597501cbc594abdd1087225d 100644
--- a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
@@ -116,10 +116,10 @@ void BluetoothDeviceToApiDevice(const device::BluetoothDevice& device,
out->connectable.reset(new bool(device.IsConnectable()));
std::vector<std::string>* string_uuids = new std::vector<std::string>();
- const device::BluetoothDevice::UUIDList& uuids = device.GetUUIDs();
- for (device::BluetoothDevice::UUIDList::const_iterator iter = uuids.begin();
- iter != uuids.end(); ++iter)
- string_uuids->push_back(iter->canonical_value());
+ const device::BluetoothDevice::UUIDSet& uuids = device.GetUUIDs();
+ for (const auto& uuid : uuids) {
+ string_uuids->push_back(uuid.canonical_value());
+ }
out->uuids.reset(string_uuids);
if (device.GetInquiryRSSI())

Powered by Google App Engine
This is Rietveld 408576698