Commit 91a748cc authored by keybuk@google.com's avatar keybuk@google.com

bluetooth: remove switch from options handler too

This fell out between review and commit during a rebase.

BUG=none
TEST=verified build

Change-Id: I7a352bce306ff25dcfbfee39100b8a005eb3c18f

TBR=jhawkins@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9700069

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126951 0039d316-1c4b-4281-b951-d872f2087c98
parent 0e861e9b
...@@ -34,7 +34,8 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() { ...@@ -34,7 +34,8 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() {
} }
BluetoothOptionsHandler::~BluetoothOptionsHandler() { BluetoothOptionsHandler::~BluetoothOptionsHandler() {
adapter_->RemoveObserver(this); if (adapter_.get())
adapter_->RemoveObserver(this);
} }
void BluetoothOptionsHandler::GetLocalizedValues( void BluetoothOptionsHandler::GetLocalizedValues(
...@@ -112,13 +113,6 @@ void BluetoothOptionsHandler::GetLocalizedValues( ...@@ -112,13 +113,6 @@ void BluetoothOptionsHandler::GetLocalizedValues(
} }
void BluetoothOptionsHandler::InitializeHandler() { void BluetoothOptionsHandler::InitializeHandler() {
// Bluetooth support is a work in progress. Supress the feature unless
// explicitly enabled via a command line flag.
if (!CommandLine::ForCurrentProcess()
->HasSwitch(switches::kEnableBluetooth)) {
return;
}
adapter_.reset(BluetoothAdapter::CreateDefaultAdapter()); adapter_.reset(BluetoothAdapter::CreateDefaultAdapter());
adapter_->AddObserver(this); adapter_->AddObserver(this);
......
...@@ -53,11 +53,6 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() : weak_ptr_factory_(this) { ...@@ -53,11 +53,6 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() : weak_ptr_factory_(this) {
} }
BluetoothOptionsHandler::~BluetoothOptionsHandler() { BluetoothOptionsHandler::~BluetoothOptionsHandler() {
if (!CommandLine::ForCurrentProcess()
->HasSwitch(switches::kEnableBluetooth)) {
return;
}
if (adapter_.get()) if (adapter_.get())
adapter_->RemoveObserver(this); adapter_->RemoveObserver(this);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment