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

Unified Diff: device/bluetooth/bluetooth_adapter_android.h

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't purge devices continuously. Added more tests. Created 4 years, 6 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_android.h
diff --git a/device/bluetooth/bluetooth_adapter_android.h b/device/bluetooth/bluetooth_adapter_android.h
index c56914888a76c103184bb82e683116ed7a808146..94dc65d0daa0ef279d116a8fe60eec67603eb4d6 100644
--- a/device/bluetooth/bluetooth_adapter_android.h
+++ b/device/bluetooth/bluetooth_adapter_android.h
@@ -128,9 +128,19 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterAndroid final
void RemovePairingDelegateInternal(
BluetoothDevice::PairingDelegate* pairing_delegate) override;
+ void PurgeTimedOutDevices();
+
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
+
// Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter.
base::android::ScopedJavaGlobalRef<jobject> j_adapter_;
+ private:
+ bool AddDiscoverySessionInternal();
+ bool RemoveDiscoverySessionInternal();
+
+ uint8_t numDiscoverySessions = 0;
+
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698