summaryrefslogtreecommitdiffstats
path: root/components/pairing
diff options
context:
space:
mode:
authorzork <zork@chromium.org>2014-10-27 18:28:35 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 01:29:24 +0000
commit27600066b205599d8e88bf6761968bab51e8e7dd (patch)
treee0cb8b48398ae461b936ae2ba81145168a5c47f4 /components/pairing
parentd21850201a4ab626fdc703d9e534c04b683895d3 (diff)
downloadchromium_src-27600066b205599d8e88bf6761968bab51e8e7dd.zip
chromium_src-27600066b205599d8e88bf6761968bab51e8e7dd.tar.gz
chromium_src-27600066b205599d8e88bf6761968bab51e8e7dd.tar.bz2
Clear the bluetooth discoverable bit when OOBE is finished on Remora.
BUG=427089 Review URL: https://codereview.chromium.org/681903002 Cr-Commit-Position: refs/heads/master@{#301543}
Diffstat (limited to 'components/pairing')
-rw-r--r--components/pairing/bluetooth_host_pairing_controller.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc
index 1d35628..5a8c8aa 100644
--- a/components/pairing/bluetooth_host_pairing_controller.cc
+++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -65,8 +65,13 @@ BluetoothHostPairingController::BluetoothHostPairingController()
}
BluetoothHostPairingController::~BluetoothHostPairingController() {
- if (adapter_.get())
+ if (adapter_.get()) {
+ if (adapter_->IsDiscoverable()) {
+ adapter_->SetDiscoverable(false, base::Closure(), base::Closure());
+ }
adapter_->RemoveObserver(this);
+ adapter_ = NULL;
+ }
}
void BluetoothHostPairingController::ChangeStage(Stage new_stage) {
@@ -282,7 +287,6 @@ void BluetoothHostPairingController::OnSetError() {
void BluetoothHostPairingController::OnAcceptError(
const std::string& error_message) {
LOG(ERROR) << error_message;
- Reset();
}
void BluetoothHostPairingController::OnSendError(
@@ -294,7 +298,6 @@ void BluetoothHostPairingController::OnReceiveError(
device::BluetoothSocket::ErrorReason reason,
const std::string& error_message) {
LOG(ERROR) << reason << ", " << error_message;
- Reset();
}
void BluetoothHostPairingController::OnHostStatusMessage(