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

Unified Diff: device/bluetooth/bluetooth_socket_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 compile and update histograms 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
Index: device/bluetooth/bluetooth_socket_chromeos.cc
diff --git a/device/bluetooth/bluetooth_socket_chromeos.cc b/device/bluetooth/bluetooth_socket_chromeos.cc
index e7fb6bdfb6476c8253f5fffee6f6c4bafaec5a77..6f922be63968b597334ad0567a08baa0a43b094f 100644
--- a/device/bluetooth/bluetooth_socket_chromeos.cc
+++ b/device/bluetooth/bluetooth_socket_chromeos.cc
@@ -92,6 +92,7 @@ BluetoothSocketChromeOS::~BluetoothSocketChromeOS() {
void BluetoothSocketChromeOS::Connect(
const BluetoothDeviceChromeOS* device,
const BluetoothUUID& uuid,
+ SecurityLevel security_level,
const base::Closure& success_callback,
const ErrorCompletionCallback& error_callback) {
DCHECK(ui_task_runner()->RunsTasksOnCurrentThread());
@@ -107,6 +108,8 @@ void BluetoothSocketChromeOS::Connect(
device_path_ = device->object_path();
uuid_ = uuid;
options_.reset(new BluetoothProfileManagerClient::Options());
+ if (security_level == SECURITY_LEVEL_LOW)
+ options_->require_authentication.reset(new bool(false));
RegisterProfile(success_callback, error_callback);
}

Powered by Google App Engine
This is Rietveld 408576698