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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 2228953003: bluetooth: Change GetInquiryTxPower and GetInquiryRSSI to return optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: TIL value_or 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 | « device/bluetooth/bluetooth_classic_device_mac.mm ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 8b4c5b0018f11595db363041b4df3fb9814c5371..bc346e835ae91e6842a660fbda33dd751aa432b7 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -305,15 +305,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothDevice {
virtual UUIDList GetUUIDs() const;
// The received signal strength, in dBm. This field is avaliable and valid
- // only during discovery. If not during discovery, or RSSI wasn't reported,
- // this method will return |kUnknownPower|.
- virtual int16_t GetInquiryRSSI() const = 0;
+ // only during discovery.
+ virtual base::Optional<int8_t> GetInquiryRSSI() const = 0;
// The transmitted power level. This field is avaliable only for LE devices
// that include this field in AD. It is avaliable and valid only during
- // discovery. If not during discovery, or TxPower wasn't reported, this
- // method will return |kUnknownPower|.
- virtual int16_t GetInquiryTxPower() const = 0;
+ // discovery.
+ virtual base::Optional<int8_t> GetInquiryTxPower() const = 0;
// The ErrorCallback is used for methods that can fail in which case it
// is called, in the success case the callback is simply not called.
« no previous file with comments | « device/bluetooth/bluetooth_classic_device_mac.mm ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698