| Index: device/bluetooth/dbus/bluetooth_gatt_service_client.cc
|
| diff --git a/chromeos/dbus/bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
|
| similarity index 87%
|
| rename from chromeos/dbus/bluetooth_gatt_service_client.cc
|
| rename to device/bluetooth/dbus/bluetooth_gatt_service_client.cc
|
| index 58266c1856bb98946699e2df9ba21fc7d1f80322..dc3ef5ac41fc8d6d4961418762856b5b22f646b7 100644
|
| --- a/chromeos/dbus/bluetooth_gatt_service_client.cc
|
| +++ b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chromeos/dbus/bluetooth_gatt_service_client.h"
|
| +#include "device/bluetooth/dbus/bluetooth_gatt_service_client.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/memory/weak_ptr.h"
|
| @@ -11,12 +11,12 @@
|
| #include "dbus/object_manager.h"
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
|
|
| -namespace chromeos {
|
| +namespace bluez {
|
|
|
| BluetoothGattServiceClient::Properties::Properties(
|
| dbus::ObjectProxy* object_proxy,
|
| const std::string& interface_name,
|
| - const PropertyChangedCallback&callback)
|
| + const PropertyChangedCallback& callback)
|
| : dbus::PropertySet(object_proxy, interface_name, callback) {
|
| RegisterProperty(bluetooth_gatt_service::kUUIDProperty, &uuid);
|
| RegisterProperty(bluetooth_gatt_service::kIncludesProperty, &includes);
|
| @@ -26,17 +26,14 @@ BluetoothGattServiceClient::Properties::Properties(
|
| &characteristics);
|
| }
|
|
|
| -BluetoothGattServiceClient::Properties::~Properties() {
|
| -}
|
| +BluetoothGattServiceClient::Properties::~Properties() {}
|
|
|
| // The BluetoothGattServiceClient implementation used in production.
|
| class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient,
|
| public dbus::ObjectManager::Interface {
|
| public:
|
| BluetoothGattServiceClientImpl()
|
| - : object_manager_(NULL),
|
| - weak_ptr_factory_(this) {
|
| - }
|
| + : object_manager_(NULL), weak_ptr_factory_(this) {}
|
|
|
| ~BluetoothGattServiceClientImpl() override {
|
| object_manager_->UnregisterInterface(
|
| @@ -65,10 +62,8 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient,
|
| // BluetoothGattServiceClientImpl override.
|
| Properties* GetProperties(const dbus::ObjectPath& object_path) override {
|
| DCHECK(object_manager_);
|
| - return static_cast<Properties*>(
|
| - object_manager_->GetProperties(
|
| - object_path,
|
| - bluetooth_gatt_service::kBluetoothGattServiceInterface));
|
| + return static_cast<Properties*>(object_manager_->GetProperties(
|
| + object_path, bluetooth_gatt_service::kBluetoothGattServiceInterface));
|
| }
|
|
|
| // dbus::ObjectManager::Interface override.
|
| @@ -77,11 +72,9 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient,
|
| const dbus::ObjectPath& object_path,
|
| const std::string& interface_name) override {
|
| Properties* properties = new Properties(
|
| - object_proxy,
|
| - interface_name,
|
| + object_proxy, interface_name,
|
| base::Bind(&BluetoothGattServiceClientImpl::OnPropertyChanged,
|
| - weak_ptr_factory_.GetWeakPtr(),
|
| - object_path));
|
| + weak_ptr_factory_.GetWeakPtr(), object_path));
|
| return static_cast<dbus::PropertySet*>(properties);
|
| }
|
|
|
| @@ -138,15 +131,13 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient,
|
| DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClientImpl);
|
| };
|
|
|
| -BluetoothGattServiceClient::BluetoothGattServiceClient() {
|
| -}
|
| +BluetoothGattServiceClient::BluetoothGattServiceClient() {}
|
|
|
| -BluetoothGattServiceClient::~BluetoothGattServiceClient() {
|
| -}
|
| +BluetoothGattServiceClient::~BluetoothGattServiceClient() {}
|
|
|
| // static
|
| BluetoothGattServiceClient* BluetoothGattServiceClient::Create() {
|
| return new BluetoothGattServiceClientImpl();
|
| }
|
|
|
| -} // namespace chromeos
|
| +} // namespace bluez
|
|
|