| Index: device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| similarity index 78%
|
| rename from chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| rename to device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| index 9779c3aee0eae1d0d236809bf81d0888de3f43ec..4376ce982b134db4ff72e012b8312bdde3982230 100644
|
| --- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc
|
| @@ -2,15 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.h"
|
| +#include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.h"
|
|
|
| #include "base/logging.h"
|
| #include "base/strings/string_util.h"
|
| -#include "chromeos/dbus/dbus_thread_manager.h"
|
| -#include "chromeos/dbus/fake_bluetooth_gatt_characteristic_service_provider.h"
|
| -#include "chromeos/dbus/fake_bluetooth_gatt_manager_client.h"
|
| +#include "device/bluetooth/dbus/bluez_dbus_manager.h"
|
| +#include "device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provider.h"
|
| +#include "device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h"
|
|
|
| -namespace chromeos {
|
| +namespace bluez {
|
|
|
| FakeBluetoothGattDescriptorServiceProvider::
|
| FakeBluetoothGattDescriptorServiceProvider(
|
| @@ -19,10 +19,10 @@ FakeBluetoothGattDescriptorServiceProvider::
|
| const std::string& uuid,
|
| const std::vector<std::string>& permissions,
|
| const dbus::ObjectPath& characteristic_path)
|
| - : object_path_(object_path),
|
| - uuid_(uuid),
|
| - characteristic_path_(characteristic_path),
|
| - delegate_(delegate) {
|
| + : object_path_(object_path),
|
| + uuid_(uuid),
|
| + characteristic_path_(characteristic_path),
|
| + delegate_(delegate) {
|
| VLOG(1) << "Creating Bluetooth GATT descriptor: " << object_path_.value();
|
|
|
| DCHECK(object_path_.IsValid());
|
| @@ -37,21 +37,18 @@ FakeBluetoothGattDescriptorServiceProvider::
|
|
|
| FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
|
| static_cast<FakeBluetoothGattManagerClient*>(
|
| - DBusThreadManager::Get()->GetBluetoothGattManagerClient());
|
| - fake_bluetooth_gatt_manager_client->
|
| - RegisterDescriptorServiceProvider(this);
|
| + bluez::BluezDBusManager::Get()->GetBluetoothGattManagerClient());
|
| + fake_bluetooth_gatt_manager_client->RegisterDescriptorServiceProvider(this);
|
| }
|
|
|
| FakeBluetoothGattDescriptorServiceProvider::
|
| ~FakeBluetoothGattDescriptorServiceProvider() {
|
| - VLOG(1) << "Cleaning up Bluetooth GATT descriptor: "
|
| - << object_path_.value();
|
| + VLOG(1) << "Cleaning up Bluetooth GATT descriptor: " << object_path_.value();
|
|
|
| FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
|
| static_cast<FakeBluetoothGattManagerClient*>(
|
| - DBusThreadManager::Get()->GetBluetoothGattManagerClient());
|
| - fake_bluetooth_gatt_manager_client->
|
| - UnregisterDescriptorServiceProvider(this);
|
| + bluez::BluezDBusManager::Get()->GetBluetoothGattManagerClient());
|
| + fake_bluetooth_gatt_manager_client->UnregisterDescriptorServiceProvider(this);
|
| }
|
|
|
| void FakeBluetoothGattDescriptorServiceProvider::SendValueChanged(
|
| @@ -69,7 +66,7 @@ void FakeBluetoothGattDescriptorServiceProvider::GetValue(
|
| // Check if this descriptor is registered.
|
| FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
|
| static_cast<FakeBluetoothGattManagerClient*>(
|
| - DBusThreadManager::Get()->GetBluetoothGattManagerClient());
|
| + bluez::BluezDBusManager::Get()->GetBluetoothGattManagerClient());
|
| FakeBluetoothGattCharacteristicServiceProvider* characteristic =
|
| fake_bluetooth_gatt_manager_client->GetCharacteristicServiceProvider(
|
| characteristic_path_);
|
| @@ -100,7 +97,7 @@ void FakeBluetoothGattDescriptorServiceProvider::SetValue(
|
| // Check if this descriptor is registered.
|
| FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client =
|
| static_cast<FakeBluetoothGattManagerClient*>(
|
| - DBusThreadManager::Get()->GetBluetoothGattManagerClient());
|
| + bluez::BluezDBusManager::Get()->GetBluetoothGattManagerClient());
|
| FakeBluetoothGattCharacteristicServiceProvider* characteristic =
|
| fake_bluetooth_gatt_manager_client->GetCharacteristicServiceProvider(
|
| characteristic_path_);
|
| @@ -121,4 +118,4 @@ void FakeBluetoothGattDescriptorServiceProvider::SetValue(
|
| delegate_->SetDescriptorValue(value, callback, error_callback);
|
| }
|
|
|
| -} // namespace chromeos
|
| +} // namespace bluez
|
|
|