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

Unified Diff: device/bluetooth/bluez/bluetooth_adapter_bluez.cc

Issue 2279853002: Make BluetoothAdapterBlueZ::Init early out if shutdown (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
index 5dd44416a7c794d914733e7bfbac7e29418aea5a..0ffd4f968aca411cd541f5e0076a45e08e2c7645 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -208,6 +208,10 @@ BluetoothAdapterBlueZ::BluetoothAdapterBlueZ(const InitCallback& init_callback)
}
void BluetoothAdapterBlueZ::Init() {
+ // We've been shutdown before Init() was run. Do nothing.
+ if (dbus_is_shutdown_)
sky 2016/08/25 17:15:09 I don't know if we need to set initialized_ and ru
Rahul Chaturvedi 2016/08/25 20:21:59 In case a test is waiting on the adapter to get re
sky 2016/08/25 20:27:27 Done.
+ return;
+
// If the platform doesn't support Object Manager then Bluez 5 is probably
// not present. In this case we just return without initializing anything.
if (!bluez::BluezDBusManager::Get()->IsObjectManagerSupported()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698