Fix crash on second failed connect to a paired device
commit089a7dade5bfd6858fd88851d2171be816854845
authorjamuraa <jamuraa@chromium.org>
Mon, 9 Feb 2015 21:13:47 +0000 (9 13:13 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 9 Feb 2015 21:14:52 +0000 (9 21:14 +0000)
tree104ea90ae8a1f0452cccf5c47c2208e6801a4b08
parentd7798e13906ebb1b531043738446eb378da369b1
Fix crash on second failed connect to a paired device

When failing to connect to a previously-paired device, the profile would
not be cleared.  This sets adapter_ in RegisterProfile() so that it will
be set correctly for profile release later.

Also includes unit tests, adding a paired but non-connectable device.

BUG=455868

Review URL: https://codereview.chromium.org/910433002

Cr-Commit-Position: refs/heads/master@{#315394}
chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
chromeos/dbus/fake_bluetooth_device_client.cc
chromeos/dbus/fake_bluetooth_device_client.h
device/bluetooth/bluetooth_adapter_chromeos.cc
device/bluetooth/bluetooth_chromeos_unittest.cc
device/bluetooth/bluetooth_socket_chromeos.cc
device/bluetooth/bluetooth_socket_chromeos_unittest.cc