Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2647)

Unified Diff: device/bluetooth/bluetooth_advertisement_chromeos.cc

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_advertisement_chromeos.cc
diff --git a/device/bluetooth/bluetooth_advertisement_chromeos.cc b/device/bluetooth/bluetooth_advertisement_chromeos.cc
index 8cdfe90e876ca3154fc305f58ae6384123943379..671977dc3a0b738665fb1ceb811ef6cf8788fddb 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,10 +82,12 @@ BluetoothAdvertisementChromeOS::BluetoothAdvertisementChromeOS(
dbus::ObjectPath advertisement_object_path =
dbus::ObjectPath("/org/chromium/bluetooth_advertisement/" + GuidString);
- DCHECK(DBusThreadManager::Get());
- provider_ = BluetoothLEAdvertisementServiceProvider::Create(
- DBusThreadManager::Get()->GetSystemBus(), advertisement_object_path, this,
- static_cast<BluetoothLEAdvertisementServiceProvider::AdvertisementType>(
+ DCHECK(bluez::BluezDBusManager::Get());
+ provider_ = bluez::BluetoothLEAdvertisementServiceProvider::Create(
+ bluez::BluezDBusManager::Get()->GetSystemBus(), advertisement_object_path,
+ this,
+ static_cast<
+ bluez::BluetoothLEAdvertisementServiceProvider::AdvertisementType>(
data->type()),
data->service_uuids().Pass(), data->manufacturer_data().Pass(),
data->solicit_uuids().Pass(), data->service_data().Pass());
@@ -95,8 +97,8 @@ void BluetoothAdvertisementChromeOS::Register(
const base::Closure& success_callback,
const device::BluetoothAdapter::CreateAdvertisementErrorCallback&
error_callback) {
- DCHECK(DBusThreadManager::Get());
- DBusThreadManager::Get()
+ DCHECK(bluez::BluezDBusManager::Get());
+ bluez::BluezDBusManager::Get()
->GetBluetoothLEAdvertisingManagerClient()
->RegisterAdvertisement(
adapter_->object_path(), provider_->object_path(), success_callback,
@@ -118,8 +120,8 @@ void BluetoothAdvertisementChromeOS::Unregister(
return;
}
- DCHECK(DBusThreadManager::Get());
- DBusThreadManager::Get()
+ DCHECK(bluez::BluezDBusManager::Get());
+ bluez::BluezDBusManager::Get()
->GetBluetoothLEAdvertisingManagerClient()
->UnregisterAdvertisement(
adapter_->object_path(), provider_->object_path(), success_callback,
« no previous file with comments | « device/bluetooth/bluetooth_advertisement_chromeos.h ('k') | device/bluetooth/bluetooth_advertisement_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698