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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 12917023: Bluetooth: Disable "IsConnectable" property for ChromeOS implementation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 | « device/bluetooth/bluetooth_device_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_chromeos.cc
diff --git a/device/bluetooth/bluetooth_device_chromeos.cc b/device/bluetooth/bluetooth_device_chromeos.cc
index bef006f68adb3cc7b183caaeb54495196a81477b..45756faa9394a1af2cd662f13fb01847296116db 100644
--- a/device/bluetooth/bluetooth_device_chromeos.cc
+++ b/device/bluetooth/bluetooth_device_chromeos.cc
@@ -457,36 +457,10 @@ void BluetoothDeviceChromeOS::CollectServiceRecordsCallback(
new BluetoothServiceRecordChromeOS(address(), i->second));
}
service_records_loaded_ = true;
- OnServiceRecordsChanged();
callback.Run(service_records_);
}
-void BluetoothDeviceChromeOS::OnServiceRecordsChanged(void) {
- // Update the BluetoothDevice::connectable_ property.
- bool hid_normally_connectable = true;
- bool hid_reconnect_initiate = true;
- for (ServiceRecordList::const_iterator it = service_records_.begin();
- it != service_records_.end(); ++it) {
- if ((*it)->SupportsHid()) {
- // If there are several HID profiles, we assume the device is connectable
- // if all them are connectable.
- hid_normally_connectable =
- hid_normally_connectable && (*it)->hid_normally_connectable();
- hid_reconnect_initiate =
- hid_reconnect_initiate && (*it)->hid_reconnect_initiate();
- }
- }
- // The Bluetooth HID spec states that if HIDNormallyConnectable or
- // HIDReconnectInitiate are not present in a HID profile, the value is false.
- // Nevertheless, a device with both properties in false can't reconnect to the
- // adapter and can't be reconnected from the adapter. To avoid problems with
- // devices that don't export this properties we asume they are connectable.
- connectable_ = hid_normally_connectable || !hid_reconnect_initiate;
- VLOG(1) << "ServiceRecordsChanged for " << address_
- << ": connectable = " << connectable_;
-}
-
void BluetoothDeviceChromeOS::OnSetTrusted(bool success) {
LOG_IF(WARNING, !success) << "Failed to set device as trusted: " << address_;
}
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698