Index: device/bluetooth/bluetooth_adapter_profile_chromeos.cc |
diff --git a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc b/device/bluetooth/bluetooth_adapter_profile_chromeos.cc |
index 2feff37aed352abdbf8c54b8f42ecd096f465639..ff48bd4f80e36603af5ba1d000f9f40b93e57c1d 100644 |
--- a/device/bluetooth/bluetooth_adapter_profile_chromeos.cc |
+++ b/device/bluetooth/bluetooth_adapter_profile_chromeos.cc |
@@ -20,28 +20,24 @@ namespace chromeos { |
// static |
BluetoothAdapterProfileChromeOS* BluetoothAdapterProfileChromeOS::Register( |
- BluetoothAdapterChromeOS* adapter, |
const device::BluetoothUUID& uuid, |
const BluetoothProfileManagerClient::Options& options, |
- const base::Closure& success_callback, |
+ const BluetoothAdapterChromeOS::ProfileRegisteredCallback& success_callback, |
const BluetoothProfileManagerClient::ErrorCallback& error_callback) { |
- DCHECK(adapter); |
- |
BluetoothAdapterProfileChromeOS* profile = |
- new BluetoothAdapterProfileChromeOS(adapter, uuid); |
+ new BluetoothAdapterProfileChromeOS(uuid); |
VLOG(1) << "Registering profile: " << profile->object_path().value(); |
DBusThreadManager::Get()->GetBluetoothProfileManagerClient()->RegisterProfile( |
- profile->object_path(), uuid.canonical_value(), options, success_callback, |
- error_callback); |
+ profile->object_path(), uuid.canonical_value(), options, |
+ base::Bind(success_callback, profile), error_callback); |
armansito
2015/02/27 21:04:57
I think it would be better formatting to put each
Marie Janssen
2015/02/27 22:56:06
Done.
|
return profile; |
} |
BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS( |
- BluetoothAdapterChromeOS* adapter, |
const device::BluetoothUUID& uuid) |
- : uuid_(uuid), adapter_(adapter), weak_ptr_factory_(this) { |
+ : uuid_(uuid), weak_ptr_factory_(this) { |
std::string uuid_path; |
base::ReplaceChars(uuid.canonical_value(), ":-", "_", &uuid_path); |
object_path_ = |
@@ -54,7 +50,6 @@ BluetoothAdapterProfileChromeOS::BluetoothAdapterProfileChromeOS( |
} |
BluetoothAdapterProfileChromeOS::~BluetoothAdapterProfileChromeOS() { |
- profile_.reset(); |
} |
bool BluetoothAdapterProfileChromeOS::SetDelegate( |