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

Unified Diff: components/pairing/bluetooth_host_pairing_controller.cc

Issue 1887953002: Revert of [Merge to M50] Enable bootstrapping feature by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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 | « components/pairing/bluetooth_host_pairing_controller.h ('k') | 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 98f85b731e3a648dc7614a0314b48fea446a4155..aa6760aab6363cd5736990c6ecef27e932536116 100644
--- a/components/pairing/bluetooth_host_pairing_controller.cc
+++ b/components/pairing/bluetooth_host_pairing_controller.cc
@@ -100,6 +100,13 @@
BluetoothHostPairingController::~BluetoothHostPairingController() {
Reset();
+ if (adapter_.get()) {
+ if (adapter_->IsDiscoverable()) {
+ adapter_->SetDiscoverable(false, base::Closure(), base::Closure());
+ }
+ adapter_->RemoveObserver(this);
+ adapter_ = NULL;
+ }
}
void BluetoothHostPairingController::ChangeStage(Stage new_stage) {
@@ -152,19 +159,6 @@
service_socket_->Close();
service_socket_ = NULL;
}
-
- if (adapter_.get()) {
- if (adapter_->IsDiscoverable()) {
- adapter_->SetDiscoverable(false, base::Bind(&base::DoNothing),
- base::Bind(&base::DoNothing));
- }
- if (!was_powered_) {
- adapter_->SetPowered(false, base::Bind(&base::DoNothing),
- base::Bind(&base::DoNothing));
- }
- adapter_->RemoveObserver(this);
- adapter_ = NULL;
- }
ChangeStage(STAGE_NONE);
}
@@ -200,7 +194,6 @@
void BluetoothHostPairingController::OnSetName() {
DCHECK(thread_checker_.CalledOnValidThread());
if (adapter_->IsPowered()) {
- was_powered_ = true;
OnSetPowered();
} else {
adapter_->SetPowered(
« no previous file with comments | « components/pairing/bluetooth_host_pairing_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698