summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/bluetooth_advertisement_chromeos.cc
diff options
context:
space:
mode:
Diffstat (limited to 'device/bluetooth/bluetooth_advertisement_chromeos.cc')
-rw-r--r--device/bluetooth/bluetooth_advertisement_chromeos.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/device/bluetooth/bluetooth_advertisement_chromeos.cc b/device/bluetooth/bluetooth_advertisement_chromeos.cc
index 671977d..8cdfe90 100644
--- a/device/bluetooth/bluetooth_advertisement_chromeos.cc
+++ b/device/bluetooth/bluetooth_advertisement_chromeos.cc
@@ -12,11 +12,11 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
+#include "chromeos/dbus/bluetooth_le_advertising_manager_client.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
#include "dbus/bus.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_adapter_chromeos.h"
-#include "device/bluetooth/dbus/bluetooth_le_advertising_manager_client.h"
-#include "device/bluetooth/dbus/bluez_dbus_manager.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace {
@@ -82,12 +82,10 @@ BluetoothAdvertisementChromeOS::BluetoothAdvertisementChromeOS(
dbus::ObjectPath advertisement_object_path =
dbus::ObjectPath("/org/chromium/bluetooth_advertisement/" + GuidString);
- DCHECK(bluez::BluezDBusManager::Get());
- provider_ = bluez::BluetoothLEAdvertisementServiceProvider::Create(
- bluez::BluezDBusManager::Get()->GetSystemBus(), advertisement_object_path,
- this,
- static_cast<
- bluez::BluetoothLEAdvertisementServiceProvider::AdvertisementType>(
+ DCHECK(DBusThreadManager::Get());
+ provider_ = BluetoothLEAdvertisementServiceProvider::Create(
+ DBusThreadManager::Get()->GetSystemBus(), advertisement_object_path, this,
+ static_cast<BluetoothLEAdvertisementServiceProvider::AdvertisementType>(
data->type()),
data->service_uuids().Pass(), data->manufacturer_data().Pass(),
data->solicit_uuids().Pass(), data->service_data().Pass());
@@ -97,8 +95,8 @@ void BluetoothAdvertisementChromeOS::Register(
const base::Closure& success_callback,
const device::BluetoothAdapter::CreateAdvertisementErrorCallback&
error_callback) {
- DCHECK(bluez::BluezDBusManager::Get());
- bluez::BluezDBusManager::Get()
+ DCHECK(DBusThreadManager::Get());
+ DBusThreadManager::Get()
->GetBluetoothLEAdvertisingManagerClient()
->RegisterAdvertisement(
adapter_->object_path(), provider_->object_path(), success_callback,
@@ -120,8 +118,8 @@ void BluetoothAdvertisementChromeOS::Unregister(
return;
}
- DCHECK(bluez::BluezDBusManager::Get());
- bluez::BluezDBusManager::Get()
+ DCHECK(DBusThreadManager::Get());
+ DBusThreadManager::Get()
->GetBluetoothLEAdvertisingManagerClient()
->UnregisterAdvertisement(
adapter_->object_path(), provider_->object_path(), success_callback,