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

Unified Diff: device/bluetooth/bluez/bluetooth_device_bluez.h

Issue 1941923002: bluetooth: Return int8_t and use -128 for unknown tx power. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix extensions tests Created 4 years, 7 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/bluez/bluetooth_device_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h
index 36bb45f38caf797d613e179e4054cf7fcc46c38b..6ef2e1b8ce0de136e88be89505fd62a205f99b4f 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/optional.h"
#include "base/sequenced_task_runner.h"
#include "dbus/object_path.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -54,8 +55,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
bool IsConnectable() const override;
bool IsConnecting() const override;
UUIDList GetUUIDs() const override;
- int16_t GetInquiryRSSI() const override;
- int16_t GetInquiryTxPower() const override;
+ base::Optional<int8_t> GetInquiryRSSI() const override;
+ base::Optional<int8_t> GetInquiryTxPower() const override;
bool ExpectingPinCode() const override;
bool ExpectingPasskey() const override;
bool ExpectingConfirmation() const override;
@@ -129,9 +130,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceBlueZ
// Called by dbus:: on completion of the D-Bus method call to get the
// connection attributes of the current connection to the device.
void OnGetConnInfo(const ConnectionInfoCallback& callback,
- int16_t rssi,
- int16_t transmit_power,
- int16_t max_transmit_power);
+ const base::Optional<int16_t>& rssi,
+ const base::Optional<int16_t>& transmit_power,
+ const base::Optional<int16_t>& max_transmit_power);
void OnGetConnInfoError(const ConnectionInfoCallback& callback,
const std::string& error_name,
const std::string& error_message);

Powered by Google App Engine
This is Rietveld 408576698