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

Unified Diff: components/pairing/bluetooth_host_pairing_controller.cc

Issue 681903002: Clear the bluetooth discoverable bit when OOBE is finished on Remora. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pairing/bluetooth_host_pairing_controller.cc
diff --git a/components/pairing/bluetooth_host_pairing_controller.cc b/components/pairing/bluetooth_host_pairing_controller.cc
index 1d3562802588361a164e0b9f49bfac5c5dc068a6..5a8c8aab255b192e6d909dfb3b07586a3700c3b4 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;
achuithb 2014/10/27 21:47:32 nit: this is not necessary since this object's dat
Zachary Kuznia 2014/10/28 00:01:41 Acknowledged.
+ }
}
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698