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

Unified Diff: device/bluetooth/bluetooth_adapter_factory.cc

Issue 848613003: bluetooth: Shutdown BluetoothAdapter before DBus on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: MockBluetoothAdapter::OnDBusThreadManagerShutdown (and a rebase) 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_factory.cc
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc
index 33950531312af20a9c055c817a7e4c031c2a37e7..5d36954454ab2b8ef4582aec3b12d2a0282a488c 100644
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -12,6 +12,10 @@
#include "base/memory/weak_ptr.h"
#include "device/bluetooth/bluetooth_adapter.h"
+#if defined(OS_CHROMEOS)
+#include "device/bluetooth/bluetooth_adapter_chromeos.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#endif
@@ -94,6 +98,15 @@ void BluetoothAdapterFactory::GetAdapter(const AdapterCallback& callback) {
}
+#if defined(OS_CHROMEOS)
+// static
+void BluetoothAdapterFactory::OnDBusThreadManagerShutdown() {
+ if (default_adapter.Get()) {
+ default_adapter.Get().get()->OnDBusThreadManagerShutdown();
+ }
+}
+#endif
+
// static
void BluetoothAdapterFactory::SetAdapterForTesting(
scoped_refptr<BluetoothAdapter> adapter) {

Powered by Google App Engine
This is Rietveld 408576698