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

Unified Diff: chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc

Issue 13933012: Bluetooth: Don't attempt a pairing for devices not supporting it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: todo added Created 7 years, 8 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 | « chrome/browser/chromeos/system/ash_system_tray_delegate.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
index f9948436888ff525d78156141612bd497a1b3793..695fa2b80e34ac52899addc8808e2f54f9782ad9 100644
--- a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc
@@ -289,11 +289,17 @@ void BluetoothOptionsHandler::UpdateDeviceCallback(
<< ": " << auth_token;
}
} else {
+ // Determine if the device supports pairing:
+ PairingDelegate* delegate = NULL;
+ if (device->IsPairable())
+ delegate = this;
+
// Connection request.
VLOG(1) << "Connect: " << address;
device->Connect(
- this,
- base::Bind(&base::DoNothing),
+ delegate,
+ base::Bind(&BluetoothOptionsHandler::DismissDisplayOrConfirm,
+ weak_ptr_factory_.GetWeakPtr()),
base::Bind(&BluetoothOptionsHandler::ConnectError,
weak_ptr_factory_.GetWeakPtr(),
device->GetAddress()));
« no previous file with comments | « chrome/browser/chromeos/system/ash_system_tray_delegate.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698