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

Unified Diff: device/bluetooth/bluetooth_gatt_notify_session_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_notify_session_chromeos.cc
diff --git a/device/bluetooth/bluetooth_gatt_notify_session_chromeos.cc b/device/bluetooth/bluetooth_gatt_notify_session_chromeos.cc
index ba7b84314e1b3e82a976f1143f725d98c1621f3a..02f7ed8bbbe37f09af1694dc505fb6c0fc0a0bb3 100644
--- a/device/bluetooth/bluetooth_gatt_notify_session_chromeos.cc
+++ b/device/bluetooth/bluetooth_gatt_notify_session_chromeos.cc
@@ -6,11 +6,11 @@
#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/bluetooth_gatt_service.h"
#include "device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
namespace chromeos {
@@ -32,12 +32,13 @@ BluetoothGattNotifySessionChromeOS::BluetoothGattNotifySessionChromeOS(
DCHECK(!characteristic_id_.empty());
DCHECK(object_path_.IsValid());
- DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient()->AddObserver(
- this);
+ bluez::BluezDBusManager::Get()
+ ->GetBluetoothGattCharacteristicClient()
+ ->AddObserver(this);
}
BluetoothGattNotifySessionChromeOS::~BluetoothGattNotifySessionChromeOS() {
- DBusThreadManager::Get()
+ bluez::BluezDBusManager::Get()
->GetBluetoothGattCharacteristicClient()
->RemoveObserver(this);
Stop(base::Bind(&base::DoNothing));
@@ -58,11 +59,12 @@ bool BluetoothGattNotifySessionChromeOS::IsActive() {
// actually active, since the characteristic might have stopped sending
// notifications yet this method was called before we processed the
// observer event (e.g. because somebody else called this method in their
- // BluetoothGattCharacteristicClient::Observer implementation, which was
+ // bluez::BluetoothGattCharacteristicClient::Observer implementation, which
+ // was
// called before ours). Check the client to see if notifications are still
// being sent.
- BluetoothGattCharacteristicClient::Properties* properties =
- DBusThreadManager::Get()
+ bluez::BluetoothGattCharacteristicClient::Properties* properties =
+ bluez::BluezDBusManager::Get()
->GetBluetoothGattCharacteristicClient()
->GetProperties(object_path_);
if (!properties || !properties->notifying.value())
@@ -115,8 +117,8 @@ void BluetoothGattNotifySessionChromeOS::GattCharacteristicPropertyChanged(
if (!active_)
return;
- BluetoothGattCharacteristicClient::Properties* properties =
- DBusThreadManager::Get()
+ bluez::BluetoothGattCharacteristicClient::Properties* properties =
+ bluez::BluezDBusManager::Get()
->GetBluetoothGattCharacteristicClient()
->GetProperties(object_path_);
if (!properties) {
« no previous file with comments | « device/bluetooth/bluetooth_gatt_notify_session_chromeos.h ('k') | device/bluetooth/bluetooth_pairing_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698