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

Unified Diff: device/bluetooth/bluetooth_adapter_bluez.h

Issue 1784333002: Add Device Policy Handler for Bluetooth, and allow disabling the Bluetooth adapter on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code fix Created 4 years, 8 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_bluez.h
diff --git a/device/bluetooth/bluetooth_adapter_bluez.h b/device/bluetooth/bluetooth_adapter_bluez.h
index 3d402d4fd1afac5b8da441256531c03e80f63e8d..deba2df891f59b75559cbe26f969330e85363e4c 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.h
+++ b/device/bluetooth/bluetooth_adapter_bluez.h
@@ -86,6 +86,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
const ErrorCallback& error_callback) override;
bool IsInitialized() const override;
bool IsPresent() const override;
+ void SetDisabled(bool disabled) override;
bool IsPowered() const override;
void SetPowered(bool powered,
const base::Closure& callback,
@@ -346,6 +347,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterBlueZ
// Set in |Shutdown()|, makes IsPresent()| return false.
bool dbus_is_shutdown_;
+ // Set in |SetDisabled()|, makes |IsPresent()| return false
+ // (just disables the interface, doesn't actually shut it down).
+ bool is_disabled_;
ortuno 2016/04/13 21:12:21 I don't think this is the right place to store thi
Ivan Šandrk 2016/04/14 18:08:48 In my code, I call SetDisabled through device::Blu
scheib 2016/04/14 21:41:10 You'll need to hold a reference to keep it disable
Ivan Šandrk 2016/04/15 17:32:06 Done.
+
// Number of discovery sessions that have been added.
int num_discovery_sessions_;

Powered by Google App Engine
This is Rietveld 408576698