Index: device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc |
diff --git a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc |
similarity index 87% |
rename from chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc |
rename to device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc |
index 5ff9bf46fbbef96ee38b1056f7c3e995281fae76..dcaf1ecd2a1abbd07fd8b06c49ad49f75f9738bb 100644 |
--- a/chromeos/dbus/fake_bluetooth_gatt_descriptor_client.cc |
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.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_client.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h" |
#include "base/bind.h" |
#include "base/logging.h" |
-#include "chromeos/dbus/bluetooth_gatt_characteristic_client.h" |
-#include "chromeos/dbus/dbus_thread_manager.h" |
+#include "device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h" |
+#include "device/bluetooth/dbus/bluez_dbus_manager.h" |
#include "third_party/cros_system_api/dbus/service_constants.h" |
-namespace chromeos { |
+namespace bluez { |
const char FakeBluetoothGattDescriptorClient:: |
kClientCharacteristicConfigurationPathComponent[] = "desc0000"; |
@@ -23,11 +23,9 @@ FakeBluetoothGattDescriptorClient::Properties::Properties( |
: BluetoothGattDescriptorClient::Properties( |
NULL, |
bluetooth_gatt_descriptor::kBluetoothGattDescriptorInterface, |
- callback) { |
-} |
+ callback) {} |
-FakeBluetoothGattDescriptorClient::Properties::~Properties() { |
-} |
+FakeBluetoothGattDescriptorClient::Properties::~Properties() {} |
void FakeBluetoothGattDescriptorClient::Properties::Get( |
dbus::PropertyBase* property, |
@@ -47,24 +45,20 @@ void FakeBluetoothGattDescriptorClient::Properties::Set( |
callback.Run(false); |
} |
-FakeBluetoothGattDescriptorClient::DescriptorData::DescriptorData() { |
-} |
+FakeBluetoothGattDescriptorClient::DescriptorData::DescriptorData() {} |
-FakeBluetoothGattDescriptorClient::DescriptorData::~DescriptorData() { |
-} |
+FakeBluetoothGattDescriptorClient::DescriptorData::~DescriptorData() {} |
FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() |
- : weak_ptr_factory_(this) { |
-} |
+ : weak_ptr_factory_(this) {} |
FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() { |
- for(PropertiesMap::iterator iter = properties_.begin(); iter != |
- properties_.end(); iter++) |
+ for (PropertiesMap::iterator iter = properties_.begin(); |
+ iter != properties_.end(); iter++) |
delete iter->second; |
} |
-void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) { |
-} |
+void FakeBluetoothGattDescriptorClient::Init(dbus::Bus* bus) {} |
void FakeBluetoothGattDescriptorClient::AddObserver(Observer* observer) { |
observers_.AddObserver(observer); |
@@ -107,7 +101,7 @@ void FakeBluetoothGattDescriptorClient::ReadValue( |
Properties* properties = iter->second->properties.get(); |
if (properties->uuid.value() == kClientCharacteristicConfigurationUUID) { |
BluetoothGattCharacteristicClient::Properties* chrc_props = |
- DBusThreadManager::Get() |
+ bluez::BluezDBusManager::Get() |
->GetBluetoothGattCharacteristicClient() |
->GetProperties(properties->characteristic.value()); |
DCHECK(chrc_props); |
@@ -151,9 +145,8 @@ dbus::ObjectPath FakeBluetoothGattDescriptorClient::ExposeDescriptor( |
// CCC descriptor is the only one supported at the moment. |
DCHECK(characteristic_path.IsValid()); |
- dbus::ObjectPath object_path( |
- characteristic_path.value() + "/" + |
- kClientCharacteristicConfigurationPathComponent); |
+ dbus::ObjectPath object_path(characteristic_path.value() + "/" + |
+ kClientCharacteristicConfigurationPathComponent); |
DCHECK(object_path.IsValid()); |
PropertiesMap::const_iterator iter = properties_.find(object_path); |
if (iter != properties_.end()) { |
@@ -161,10 +154,9 @@ dbus::ObjectPath FakeBluetoothGattDescriptorClient::ExposeDescriptor( |
return dbus::ObjectPath(); |
} |
- Properties* properties = new Properties(base::Bind( |
- &FakeBluetoothGattDescriptorClient::OnPropertyChanged, |
- weak_ptr_factory_.GetWeakPtr(), |
- object_path)); |
+ Properties* properties = new Properties( |
+ base::Bind(&FakeBluetoothGattDescriptorClient::OnPropertyChanged, |
+ weak_ptr_factory_.GetWeakPtr(), object_path)); |
properties->uuid.ReplaceValue(uuid); |
properties->characteristic.ReplaceValue(characteristic_path); |
@@ -195,8 +187,8 @@ void FakeBluetoothGattDescriptorClient::HideDescriptor( |
void FakeBluetoothGattDescriptorClient::OnPropertyChanged( |
const dbus::ObjectPath& object_path, |
const std::string& property_name) { |
- VLOG(2) << "Descriptor property changed: " << object_path.value() |
- << ": " << property_name; |
+ VLOG(2) << "Descriptor property changed: " << object_path.value() << ": " |
+ << property_name; |
FOR_EACH_OBSERVER(BluetoothGattDescriptorClient::Observer, observers_, |
GattDescriptorPropertyChanged(object_path, property_name)); |
@@ -214,4 +206,4 @@ void FakeBluetoothGattDescriptorClient::NotifyDescriptorRemoved( |
GattDescriptorRemoved(object_path)); |
} |
-} // namespace chromeos |
+} // namespace bluez |