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

Unified Diff: device/bluetooth/bluetooth_adapter.h

Issue 848613003: bluetooth: Shutdown BluetoothAdapter before DBus on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Limit shutdown to defined(CHROMEOS); add checks that methods aren't run after shutdown Created 5 years, 11 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.h
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index 5184f2953a09bb018f56dc7192422b1156571e89..6e3f7eaea28938ee2f251934f69deccefb342064 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -188,6 +188,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapter
static base::WeakPtr<BluetoothAdapter> CreateAdapter(
const InitCallback& init_callback);
+#if defined(OS_CHROMEOS)
+ // Shutdown the adapter, ending reliance DBusThreadManager, and resulting in
+ // the adapter's |IsPresent| returning false.
+ virtual void OnDBusThreadManagerShutdown();
stevenjb 2015/01/14 23:44:14 nit: We could make this a pure virtual and elimina
scheib 2015/01/15 00:03:40 Acknowledged.
+#endif
armansito 2015/01/14 23:49:47 I wouldn't even add this method to BluetoothAdapte
scheib 2015/01/15 00:03:40 Done.
+
// Returns a weak pointer to an existing adapter for testing purposes only.
base::WeakPtr<BluetoothAdapter> GetWeakPtrForTesting();

Powered by Google App Engine
This is Rietveld 408576698