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

Unified Diff: device/bluetooth/bluetooth_gatt_connection_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_gatt_connection_chromeos.cc
diff --git a/device/bluetooth/bluetooth_gatt_connection_chromeos.cc b/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
index b0551cff1dc16295e7f991ee756e9cbd13568087..ce531528a3570f8ee1d6480c60b2847fd89ca4da 100644
--- a/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
+++ b/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
@@ -6,9 +6,9 @@
#include "base/bind.h"
#include "base/logging.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_device.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
namespace chromeos {
@@ -24,11 +24,12 @@ BluetoothGattConnectionChromeOS::BluetoothGattConnectionChromeOS(
DCHECK(!device_address_.empty());
DCHECK(object_path_.IsValid());
- DBusThreadManager::Get()->GetBluetoothDeviceClient()->AddObserver(this);
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->AddObserver(this);
}
BluetoothGattConnectionChromeOS::~BluetoothGattConnectionChromeOS() {
- DBusThreadManager::Get()->GetBluetoothDeviceClient()->RemoveObserver(this);
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->RemoveObserver(
+ this);
Disconnect();
}
@@ -45,9 +46,9 @@ bool BluetoothGattConnectionChromeOS::IsConnected() {
if (!connected_)
return false;
- BluetoothDeviceClient::Properties* properties =
- DBusThreadManager::Get()->GetBluetoothDeviceClient()->
- GetProperties(object_path_);
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
if (!properties || !properties->connected.value())
connected_ = false;
@@ -87,9 +88,9 @@ void BluetoothGattConnectionChromeOS::DevicePropertyChanged(
if (!connected_)
return;
- BluetoothDeviceClient::Properties* properties =
- DBusThreadManager::Get()->GetBluetoothDeviceClient()->
- GetProperties(object_path_);
+ bluez::BluetoothDeviceClient::Properties* properties =
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties(
+ object_path_);
if (!properties) {
connected_ = false;

Powered by Google App Engine
This is Rietveld 408576698