summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrkc <rkc@chromium.org>2015-05-04 15:00:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-04 22:01:22 +0000
commitce74af160fe93ae38ea7ce0db757730058389c58 (patch)
tree895fb9725bcabec08adc080d7edb1b6511a521f0
parent3fbbd4fd90ad9677242e29001d04a0c36f66e1a1 (diff)
downloadchromium_src-ce74af160fe93ae38ea7ce0db757730058389c58.zip
chromium_src-ce74af160fe93ae38ea7ce0db757730058389c58.tar.gz
chromium_src-ce74af160fe93ae38ea7ce0db757730058389c58.tar.bz2
Initialize BluetoothLEAdvertisingManagerClient.
We never actually initialize the BluetoothLEAdvertisingManagerClient before using it, causing the object_manager_ that it uses to be NULL. This CL adds the call to initialize it to the DBusThreadManager. R=stevenjb@chromium.org BUG=479430 Review URL: https://codereview.chromium.org/1115413003 Cr-Commit-Position: refs/heads/master@{#328198}
-rw-r--r--chromeos/dbus/bluetooth_le_advertising_manager_client.cc4
-rw-r--r--chromeos/dbus/dbus_thread_manager.cc1
2 files changed, 3 insertions, 2 deletions
diff --git a/chromeos/dbus/bluetooth_le_advertising_manager_client.cc b/chromeos/dbus/bluetooth_le_advertising_manager_client.cc
index 35bb36e..aa90b94 100644
--- a/chromeos/dbus/bluetooth_le_advertising_manager_client.cc
+++ b/chromeos/dbus/bluetooth_le_advertising_manager_client.cc
@@ -27,8 +27,6 @@ class BluetoothAdvertisementManagerClientImpl
: object_manager_(NULL), weak_ptr_factory_(this) {}
~BluetoothAdvertisementManagerClientImpl() override {
- // TODO(rkc): object_manager_ should not be NULL, just a hot fix till
- // http://crbug.com/479430 is properly fixed.
if (object_manager_) {
object_manager_->UnregisterInterface(
bluetooth_advertising_manager::kBluetoothAdvertisingManagerInterface);
@@ -77,6 +75,7 @@ class BluetoothAdvertisementManagerClientImpl
writer.AppendObjectPath(advertisement_object_path);
+ DCHECK(object_manager_);
dbus::ObjectProxy* object_proxy =
object_manager_->GetObjectProxy(manager_object_path);
object_proxy->CallMethodWithErrorCallback(
@@ -100,6 +99,7 @@ class BluetoothAdvertisementManagerClientImpl
dbus::MessageWriter writer(&method_call);
writer.AppendObjectPath(advertisement_object_path);
+ DCHECK(object_manager_);
dbus::ObjectProxy* object_proxy =
object_manager_->GetObjectProxy(manager_object_path);
object_proxy->CallMethodWithErrorCallback(
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc
index 3f55270..aafb25d 100644
--- a/chromeos/dbus/dbus_thread_manager.cc
+++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -329,6 +329,7 @@ void DBusThreadManager::InitializeClients() {
GetBluetoothGattManagerClient()->Init(GetSystemBus());
GetBluetoothGattServiceClient()->Init(GetSystemBus());
GetBluetoothInputClient()->Init(GetSystemBus());
+ GetBluetoothLEAdvertisingManagerClient()->Init(GetSystemBus());
GetBluetoothMediaClient()->Init(GetSystemBus());
GetBluetoothMediaTransportClient()->Init(GetSystemBus());
GetBluetoothProfileManagerClient()->Init(GetSystemBus());