diff options
author | rkc <rkc@chromium.org> | 2015-10-06 04:25:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-06 11:26:53 +0000 |
commit | c7eeff6a15962486725ac28b0ded7fd9296f1e77 (patch) | |
tree | 9658dfae6f757fab11e852a17427c43160399ad7 /device/bluetooth/bluetooth_adapter_profile_chromeos.cc | |
parent | 6a4640a83d99484907275aac3bec32c474cb6c63 (diff) | |
download | chromium_src-c7eeff6a15962486725ac28b0ded7fd9296f1e77.zip chromium_src-c7eeff6a15962486725ac28b0ded7fd9296f1e77.tar.gz chromium_src-c7eeff6a15962486725ac28b0ded7fd9296f1e77.tar.bz2 |
Revert "Refactor DBusThreadManager to split away BT clients."
This reverts commit 5d3c8959a7aee861b6750fd734cad96bd24e1f9f.
This commit is breaking the valgrind tests.
R=rkc@chromium.org
TBR=armansito@chromium.org, stevenjb@chromium.org, sky@chromium.org
BUG=None.
Review URL: https://codereview.chromium.org/1382923003
Cr-Commit-Position: refs/heads/master@{#352581}
Diffstat (limited to 'device/bluetooth/bluetooth_adapter_profile_chromeos.cc')
-rw-r--r-- | device/bluetooth/bluetooth_adapter_profile_chromeos.cc | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc b/device/bluetooth/bluetooth_adapter_profile_chromeos.cc index 27779f2..aeab2ae 100644 --- a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc +++ b/device/bluetooth/bluetooth_adapter_profile_chromeos.cc @@ -9,31 +9,29 @@ #include "base/bind.h" #include "base/logging.h" #include "base/strings/string_util.h" +#include "chromeos/dbus/bluetooth_profile_service_provider.h" +#include "chromeos/dbus/dbus_thread_manager.h" #include "dbus/bus.h" #include "dbus/object_path.h" #include "device/bluetooth/bluetooth_adapter_chromeos.h" #include "device/bluetooth/bluetooth_uuid.h" -#include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" -#include "device/bluetooth/dbus/bluez_dbus_manager.h" namespace chromeos { // static void BluetoothAdapterProfileChromeOS::Register( const device::BluetoothUUID& uuid, - const bluez::BluetoothProfileManagerClient::Options& options, + const BluetoothProfileManagerClient::Options& options, const ProfileRegisteredCallback& success_callback, - const bluez::BluetoothProfileManagerClient::ErrorCallback& error_callback) { + const BluetoothProfileManagerClient::ErrorCallback& error_callback) { scoped_ptr<BluetoothAdapterProfileChromeOS> profile( new BluetoothAdapterProfileChromeOS(uuid)); VLOG(1) << "Registering profile: " << profile->object_path().value(); const dbus::ObjectPath& object_path = profile->object_path(); - bluez::BluezDBusManager::Get() - ->GetBluetoothProfileManagerClient() - ->RegisterProfile(object_path, uuid.canonical_value(), options, - base::Bind(success_callback, base::Passed(&profile)), - error_callback); + DBusThreadManager::Get()->GetBluetoothProfileManagerClient()->RegisterProfile( + object_path, uuid.canonical_value(), options, + base::Bind(success_callback, base::Passed(&profile)), error_callback); } BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS( @@ -44,9 +42,9 @@ BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS( object_path_ = dbus::ObjectPath("/org/chromium/bluetooth_profile/" + uuid_path); - dbus::Bus* system_bus = bluez::BluezDBusManager::Get()->GetSystemBus(); - profile_.reset(bluez::BluetoothProfileServiceProvider::Create( - system_bus, object_path_, this)); + dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus(); + profile_.reset( + BluetoothProfileServiceProvider::Create(system_bus, object_path_, this)); DCHECK(profile_.get()); } @@ -55,7 +53,7 @@ BluetoothAdapterProfileChromeOS::~BluetoothAdapterProfileChromeOS() { bool BluetoothAdapterProfileChromeOS::SetDelegate( const dbus::ObjectPath& device_path, - bluez::BluetoothProfileServiceProvider::Delegate* delegate) { + BluetoothProfileServiceProvider::Delegate* delegate) { DCHECK(delegate); VLOG(1) << "SetDelegate: " << object_path_.value() << " dev " << device_path.value(); @@ -85,7 +83,7 @@ void BluetoothAdapterProfileChromeOS::RemoveDelegate( VLOG(1) << device_path.value() << " No delegates left, unregistering."; // No users left, release the profile. - bluez::BluezDBusManager::Get() + DBusThreadManager::Get() ->GetBluetoothProfileManagerClient() ->UnregisterProfile( object_path_, unregistered_callback, @@ -104,7 +102,7 @@ void BluetoothAdapterProfileChromeOS::OnUnregisterProfileError( unregistered_callback.Run(); } -// bluez::BluetoothProfileServiceProvider::Delegate: +// BluetoothProfileServiceProvider::Delegate: void BluetoothAdapterProfileChromeOS::Released() { VLOG(1) << object_path_.value() << ": Release"; } @@ -112,7 +110,7 @@ void BluetoothAdapterProfileChromeOS::Released() { void BluetoothAdapterProfileChromeOS::NewConnection( const dbus::ObjectPath& device_path, scoped_ptr<dbus::FileDescriptor> fd, - const bluez::BluetoothProfileServiceProvider::Delegate::Options& options, + const BluetoothProfileServiceProvider::Delegate::Options& options, const ConfirmationCallback& callback) { dbus::ObjectPath delegate_path = device_path; |