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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_device.cc

Issue 10816023: Ensure canonical Bluetooth UUIDs are used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
Index: chrome/browser/chromeos/bluetooth/bluetooth_device.cc
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
index 57e65d5e952fb846ae058ddfe9f75ea96c7b7696..3fd8969876718d5f0b4b16bbbc1ff1431c214a4a 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/chromeos/bluetooth/bluetooth_adapter.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_service_record.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_socket.h"
+#include "chrome/browser/chromeos/bluetooth/bluetooth_utils.h"
#include "chrome/common/chrome_switches.h"
#include "chromeos/dbus/bluetooth_adapter_client.h"
#include "chromeos/dbus/bluetooth_agent_service_provider.h"
@@ -193,9 +194,9 @@ void BluetoothDevice::GetServiceRecords(const ServiceRecordsCallback& callback,
bool BluetoothDevice::ProvidesServiceWithUUID(const std::string& uuid) const {
const BluetoothDevice::ServiceList& services = GetServices();
- for (BluetoothDevice::ServiceList::const_iterator j = services.begin();
- j != services.end(); ++j) {
- if (*j == uuid)
+ for (BluetoothDevice::ServiceList::const_iterator iter = services.begin();
+ iter != services.end(); ++iter) {
+ if (bluetooth_utils::CanonicalUuid(*iter) == uuid)
return true;
}
return false;
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_device.h ('k') | chrome/browser/extensions/api/bluetooth/bluetooth_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698