Index: device/bluetooth/dbus/bluetooth_profile_service_provider.cc |
diff --git a/chromeos/dbus/bluetooth_profile_service_provider.cc b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc |
similarity index 93% |
rename from chromeos/dbus/bluetooth_profile_service_provider.cc |
rename to device/bluetooth/dbus/bluetooth_profile_service_provider.cc |
index c74da5d1bb3c2f4b492907b510a93a1181a39934..a2a23bb81cbf7f0dc84997437ce676cd2ac63974 100644 |
--- a/chromeos/dbus/bluetooth_profile_service_provider.cc |
+++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc |
@@ -2,20 +2,19 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chromeos/dbus/bluetooth_profile_service_provider.h" |
- |
+#include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" |
#include "base/bind.h" |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
#include "base/threading/platform_thread.h" |
-#include "chromeos/dbus/dbus_thread_manager.h" |
-#include "chromeos/dbus/fake_bluetooth_profile_service_provider.h" |
#include "dbus/exported_object.h" |
#include "dbus/message.h" |
+#include "device/bluetooth/dbus/bluez_dbus_manager.h" |
+#include "device/bluetooth/dbus/fake_bluetooth_profile_service_provider.h" |
#include "third_party/cros_system_api/dbus/service_constants.h" |
-namespace chromeos { |
+namespace bluez { |
// The BluetoothProfileServiceProvider implementation used in production. |
class BluetoothProfileServiceProviderImpl |
@@ -128,9 +127,7 @@ class BluetoothProfileServiceProviderImpl |
Delegate::ConfirmationCallback callback = base::Bind( |
&BluetoothProfileServiceProviderImpl::OnConfirmation, |
- weak_ptr_factory_.GetWeakPtr(), |
- method_call, |
- response_sender); |
+ weak_ptr_factory_.GetWeakPtr(), method_call, response_sender); |
delegate_->NewConnection(device_path, fd.Pass(), options, callback); |
} |
@@ -153,9 +150,7 @@ class BluetoothProfileServiceProviderImpl |
Delegate::ConfirmationCallback callback = base::Bind( |
&BluetoothProfileServiceProviderImpl::OnConfirmation, |
- weak_ptr_factory_.GetWeakPtr(), |
- method_call, |
- response_sender); |
+ weak_ptr_factory_.GetWeakPtr(), method_call, response_sender); |
delegate_->RequestDisconnection(device_path, callback); |
} |
@@ -176,8 +171,8 @@ class BluetoothProfileServiceProviderImpl |
void OnExported(const std::string& interface_name, |
const std::string& method_name, |
bool success) { |
- LOG_IF(WARNING, !success) << "Failed to export " |
- << interface_name << "." << method_name; |
+ LOG_IF(WARNING, !success) << "Failed to export " << interface_name << "." |
+ << method_name; |
} |
// Called by the Delegate in response to a method requiring confirmation. |
@@ -234,22 +229,20 @@ class BluetoothProfileServiceProviderImpl |
DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProviderImpl); |
}; |
-BluetoothProfileServiceProvider::BluetoothProfileServiceProvider() { |
-} |
+BluetoothProfileServiceProvider::BluetoothProfileServiceProvider() {} |
-BluetoothProfileServiceProvider::~BluetoothProfileServiceProvider() { |
-} |
+BluetoothProfileServiceProvider::~BluetoothProfileServiceProvider() {} |
// static |
BluetoothProfileServiceProvider* BluetoothProfileServiceProvider::Create( |
dbus::Bus* bus, |
const dbus::ObjectPath& object_path, |
Delegate* delegate) { |
- if (!DBusThreadManager::Get()->IsUsingStub(DBusClientBundle::BLUETOOTH)) { |
+ if (!bluez::BluezDBusManager::Get()->IsUsingStub()) { |
return new BluetoothProfileServiceProviderImpl(bus, object_path, delegate); |
} else { |
return new FakeBluetoothProfileServiceProvider(object_path, delegate); |
} |
} |
-} // namespace chromeos |
+} // namespace bluez |