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

Unified Diff: device/bluetooth/bluetooth_adapter.cc

Issue 1256313002: bluetooth: android: Implement & test CreateGattConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed jyasskin comments. Added more tests. 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_adapter.cc
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc
index aba8f137c520b6e60c6130d00723c7c94a844470..1ba7065784a2ec8621359a82e2a9289529809b8f 100644
--- a/device/bluetooth/bluetooth_adapter.cc
+++ b/device/bluetooth/bluetooth_adapter.cc
@@ -200,6 +200,13 @@ void BluetoothAdapter::DiscoverySessionBecameInactive(
discovery_sessions_.erase(discovery_session);
}
+void BluetoothAdapter::DeleteDeviceForTesting(const std::string& address) {
+ std::map<const std::string, BluetoothDevice*>::iterator device =
+ devices_.find(address);
+ devices_.erase(device);
+ delete device->second;
Jeffrey Yasskin 2015/09/16 01:40:49 Erasing device invalidates it, so you need to copy
scheib 2015/09/16 21:55:17 Done.
+}
+
scoped_ptr<BluetoothDiscoveryFilter>
BluetoothAdapter::GetMergedDiscoveryFilterHelper(
const BluetoothDiscoveryFilter* masked_filter,

Powered by Google App Engine
This is Rietveld 408576698