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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_agent_service_provider.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/dbus/fake_bluetooth_agent_service_provider.cc
diff --git a/chromeos/dbus/fake_bluetooth_agent_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
similarity index 84%
rename from chromeos/dbus/fake_bluetooth_agent_service_provider.cc
rename to device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
index caf298893247b2d25af1a55f07d957ec4ed3a5f0..777deb0e0804709e3402ac03b85594df8fc182f4 100644
--- a/chromeos/dbus/fake_bluetooth_agent_service_provider.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_agent_service_provider.cc
@@ -2,23 +2,22 @@
// 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_agent_service_provider.h"
+#include "device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/dbus/fake_bluetooth_agent_manager_client.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
+#include "device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h"
-namespace chromeos {
+namespace bluez {
FakeBluetoothAgentServiceProvider::FakeBluetoothAgentServiceProvider(
const dbus::ObjectPath& object_path,
Delegate* delegate)
- : object_path_(object_path),
- delegate_(delegate) {
+ : object_path_(object_path), delegate_(delegate) {
VLOG(1) << "Creating Bluetooth Agent: " << object_path_.value();
FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client =
static_cast<FakeBluetoothAgentManagerClient*>(
- DBusThreadManager::Get()->GetBluetoothAgentManagerClient());
+ bluez::BluezDBusManager::Get()->GetBluetoothAgentManagerClient());
fake_bluetooth_agent_manager_client->RegisterAgentServiceProvider(this);
}
@@ -27,7 +26,7 @@ FakeBluetoothAgentServiceProvider::~FakeBluetoothAgentServiceProvider() {
FakeBluetoothAgentManagerClient* fake_bluetooth_agent_manager_client =
static_cast<FakeBluetoothAgentManagerClient*>(
- DBusThreadManager::Get()->GetBluetoothAgentManagerClient());
+ bluez::BluezDBusManager::Get()->GetBluetoothAgentManagerClient());
fake_bluetooth_agent_manager_client->UnregisterAgentServiceProvider(this);
}
@@ -62,9 +61,10 @@ void FakeBluetoothAgentServiceProvider::RequestPasskey(
void FakeBluetoothAgentServiceProvider::DisplayPasskey(
const dbus::ObjectPath& device_path,
- uint32 passkey, int16 entered) {
- VLOG(1) << object_path_.value() << ": DisplayPasskey " << passkey
- << " (" << entered << " entered) for "<< device_path.value();
+ uint32 passkey,
+ int16 entered) {
+ VLOG(1) << object_path_.value() << ": DisplayPasskey " << passkey << " ("
+ << entered << " entered) for " << device_path.value();
delegate_->DisplayPasskey(device_path, passkey, entered);
}
@@ -73,7 +73,7 @@ void FakeBluetoothAgentServiceProvider::RequestConfirmation(
uint32 passkey,
const Delegate::ConfirmationCallback& callback) {
VLOG(1) << object_path_.value() << ": RequestConfirmation " << passkey
- << " for "<< device_path.value();
+ << " for " << device_path.value();
delegate_->RequestConfirmation(device_path, passkey, callback);
}
@@ -99,4 +99,4 @@ void FakeBluetoothAgentServiceProvider::Cancel() {
delegate_->Cancel();
}
-} // namespace chromeos
+} // namespace bluez
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_agent_service_provider.h ('k') | device/bluetooth/dbus/fake_bluetooth_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698