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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp

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: Moar fixes 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: third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp
index 0fb0cb6ead6575eea71e4b27c5c30c3490c84ae2..a76841e8fef5ede6ee8b0a0e755c66de113fdbf5 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothAdvertisingData.cpp
@@ -7,9 +7,8 @@
namespace blink {
namespace {
-// TODO(ortuno): RSSI Unknown and Tx Power Unknown should have different
-// values. Add kUnknownTxPower when implemented: http://crbug.com/551572
-const int kUnknownPower = 127;
+ const int8_t kUnknownRSSI = 127;
scheib 2016/05/04 01:18:38 Comment explaining the source of the numbers (cite
ortuno 2016/05/04 16:44:12 We removed BluetoothAdvertisingData so no need to
+ const int8_t kUnknownTxPower = -128;
} // namespace
BluetoothAdvertisingData* BluetoothAdvertisingData::create(int8_t txPower, int8_t rssi)
@@ -19,7 +18,7 @@ BluetoothAdvertisingData* BluetoothAdvertisingData::create(int8_t txPower, int8_
int8_t BluetoothAdvertisingData::txPower(bool& isNull)
{
- if (m_txPower == kUnknownPower) {
+ if (m_txPower == kUnknownTxPower) {
isNull = true;
}
return m_txPower;
@@ -27,7 +26,7 @@ int8_t BluetoothAdvertisingData::txPower(bool& isNull)
int8_t BluetoothAdvertisingData::rssi(bool& isNull)
{
- if (m_rssi == kUnknownPower) {
+ if (m_rssi == kUnknownRSSI) {
isNull = true;
}
return m_rssi;

Powered by Google App Engine
This is Rietveld 408576698