Index: chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc |
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 f7548b84d084b4b01c8739c3dc062d14976d26d0..57d5dfd25b68e615389fdde5cefce997792dd45f 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); |