| Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| index fa81d504c846b7b71d63866b266c1c73e4fc23fa..5860e51f6cf7ea788d54e210ea9fe422b6bd6716 100644
|
| --- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| +++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
| @@ -262,7 +262,7 @@ void SystemTrayDelegateChromeOS::Initialize() {
|
| void SystemTrayDelegateChromeOS::InitializeOnAdapterReady(
|
| scoped_refptr<device::BluetoothAdapter> adapter) {
|
| bluetooth_adapter_ = adapter;
|
| - CHECK(bluetooth_adapter_.get());
|
| + CHECK(bluetooth_adapter_);
|
| bluetooth_adapter_->AddObserver(this);
|
|
|
| local_state_registrar_.reset(new PrefChangeRegistrar);
|
| @@ -304,7 +304,8 @@ SystemTrayDelegateChromeOS::~SystemTrayDelegateChromeOS() {
|
| DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
|
| input_method::InputMethodManager::Get()->RemoveObserver(this);
|
| ui::ime::InputMethodMenuManager::GetInstance()->RemoveObserver(this);
|
| - bluetooth_adapter_->RemoveObserver(this);
|
| + if (bluetooth_adapter_)
|
| + bluetooth_adapter_->RemoveObserver(this);
|
| ash::WmShell::Get()->GetSessionStateDelegate()->RemoveSessionStateObserver(
|
| this);
|
|
|
| @@ -679,7 +680,7 @@ void SystemTrayDelegateChromeOS::ConnectToBluetoothDevice(
|
| }
|
|
|
| bool SystemTrayDelegateChromeOS::IsBluetoothDiscovering() {
|
| - return bluetooth_adapter_->IsDiscovering();
|
| + return bluetooth_adapter_ && bluetooth_adapter_->IsDiscovering();
|
| }
|
|
|
| void SystemTrayDelegateChromeOS::GetCurrentIME(ash::IMEInfo* info) {
|
| @@ -759,16 +760,16 @@ void SystemTrayDelegateChromeOS::ShowOtherNetworkDialog(
|
| }
|
|
|
| bool SystemTrayDelegateChromeOS::GetBluetoothAvailable() {
|
| - return bluetooth_adapter_->IsPresent();
|
| + return bluetooth_adapter_ && bluetooth_adapter_->IsPresent();
|
| }
|
|
|
| bool SystemTrayDelegateChromeOS::GetBluetoothEnabled() {
|
| - return bluetooth_adapter_->IsPowered();
|
| + return bluetooth_adapter_ && bluetooth_adapter_->IsPowered();
|
| }
|
|
|
| bool SystemTrayDelegateChromeOS::GetBluetoothDiscovering() {
|
| - return (bluetooth_discovery_session_.get() &&
|
| - bluetooth_discovery_session_->IsActive());
|
| + return bluetooth_discovery_session_ &&
|
| + bluetooth_discovery_session_->IsActive();
|
| }
|
|
|
| void SystemTrayDelegateChromeOS::ChangeProxySettings() {
|
|
|