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

Unified Diff: device/bluetooth/bluetooth_gatt_connection_chromeos.cc

Issue 1287753002: bluetooth: Remove callback from BluetoothGattConnection::Disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT 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/bluetooth_gatt_connection_chromeos.cc
diff --git a/device/bluetooth/bluetooth_gatt_connection_chromeos.cc b/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
index 94b7555170b848504b449cb5194389a3537b3ea8..b0551cff1dc16295e7f991ee756e9cbd13568087 100644
--- a/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
+++ b/device/bluetooth/bluetooth_gatt_connection_chromeos.cc
@@ -29,7 +29,7 @@ BluetoothGattConnectionChromeOS::BluetoothGattConnectionChromeOS(
BluetoothGattConnectionChromeOS::~BluetoothGattConnectionChromeOS() {
DBusThreadManager::Get()->GetBluetoothDeviceClient()->RemoveObserver(this);
- Disconnect(base::Bind(&base::DoNothing));
+ Disconnect();
}
std::string BluetoothGattConnectionChromeOS::GetDeviceAddress() const {
@@ -54,11 +54,9 @@ bool BluetoothGattConnectionChromeOS::IsConnected() {
return connected_;
}
-void BluetoothGattConnectionChromeOS::Disconnect(
- const base::Closure& callback) {
+void BluetoothGattConnectionChromeOS::Disconnect() {
if (!connected_) {
VLOG(1) << "Connection already inactive.";
- callback.Run();
return;
}
@@ -70,7 +68,6 @@ void BluetoothGattConnectionChromeOS::Disconnect(
// even though the underlying connection won't actually be disconnected. This
// technically doesn't violate the contract put forth by this API.
connected_ = false;
- callback.Run();
}
void BluetoothGattConnectionChromeOS::DeviceRemoved(
« no previous file with comments | « device/bluetooth/bluetooth_gatt_connection_chromeos.h ('k') | device/bluetooth/test/mock_bluetooth_gatt_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698