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

Unified Diff: device/bluetooth/bluetooth_device_chromeos.cc

Issue 491753002: [EasyUnlock] Add a private API for establishing an insecure Bluetooth connection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix non-ChromeOS build Created 6 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
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.h ('k') | device/bluetooth/bluetooth_socket_chromeos.h » ('j') | 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 0f1f273cb54b9b0e5f9e7a69781fcf28e63169af..0fe723ea51a038268b3cca99799a50253cb6414a 100644
--- a/device/bluetooth/bluetooth_device_chromeos.cc
+++ b/device/bluetooth/bluetooth_device_chromeos.cc
@@ -432,7 +432,21 @@ void BluetoothDeviceChromeOS::ConnectToService(
scoped_refptr<BluetoothSocketChromeOS> socket =
BluetoothSocketChromeOS::CreateBluetoothSocket(
ui_task_runner_, socket_thread_);
- socket->Connect(this, uuid, base::Bind(callback, socket), error_callback);
+ socket->Connect(this, uuid, BluetoothSocketChromeOS::SECURITY_LEVEL_MEDIUM,
+ base::Bind(callback, socket), error_callback);
+}
+
+void BluetoothDeviceChromeOS::ConnectToServiceInsecurely(
+ const BluetoothUUID& uuid,
+ const ConnectToServiceCallback& callback,
+ const ConnectToServiceErrorCallback& error_callback) {
+ VLOG(1) << object_path_.value() << ": Connecting insecurely to service: "
+ << uuid.canonical_value();
+ scoped_refptr<BluetoothSocketChromeOS> socket =
+ BluetoothSocketChromeOS::CreateBluetoothSocket(
+ ui_task_runner_, socket_thread_);
+ socket->Connect(this, uuid, BluetoothSocketChromeOS::SECURITY_LEVEL_LOW,
+ base::Bind(callback, socket), error_callback);
}
void BluetoothDeviceChromeOS::CreateGattConnection(
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.h ('k') | device/bluetooth/bluetooth_socket_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698