diff options
author | keybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 18:49:49 +0000 |
---|---|---|
committer | keybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-15 18:49:49 +0000 |
commit | 91a748cc882c49b9f3fcf161c1f8a0e7823dab6c (patch) | |
tree | dc25b8e1ab1fce516f16764c9f6a53ff3384fbaa | |
parent | 0e861e9b635f9e46b983d3dcb8ac57459f89adb2 (diff) | |
download | chromium_src-91a748cc882c49b9f3fcf161c1f8a0e7823dab6c.zip chromium_src-91a748cc882c49b9f3fcf161c1f8a0e7823dab6c.tar.gz chromium_src-91a748cc882c49b9f3fcf161c1f8a0e7823dab6c.tar.bz2 |
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
-rw-r--r-- | chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc | 10 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc | 5 |
2 files changed, 2 insertions, 13 deletions
diff --git a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc index f7548b8..57d5dfd 100644 --- a/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc @@ -34,7 +34,8 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() { } BluetoothOptionsHandler::~BluetoothOptionsHandler() { - adapter_->RemoveObserver(this); + if (adapter_.get()) + adapter_->RemoveObserver(this); } void BluetoothOptionsHandler::GetLocalizedValues( @@ -112,13 +113,6 @@ void BluetoothOptionsHandler::GetLocalizedValues( } 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_->AddObserver(this); diff --git a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc index e7b864e..c43d961 100644 --- a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc +++ b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc @@ -53,11 +53,6 @@ BluetoothOptionsHandler::BluetoothOptionsHandler() : weak_ptr_factory_(this) { } BluetoothOptionsHandler::~BluetoothOptionsHandler() { - if (!CommandLine::ForCurrentProcess() - ->HasSwitch(switches::kEnableBluetooth)) { - return; - } - if (adapter_.get()) adapter_->RemoveObserver(this); } |