| Index: content/common/bluetooth/bluetooth_device.cc
|
| diff --git a/content/common/bluetooth/bluetooth_device.cc b/content/common/bluetooth/bluetooth_device.cc
|
| index baf930cf8c9ea8c041c78132cfb04d11ab7e2b2f..ece3ce4d29b5328767597b04a65c22e177d85276 100644
|
| --- a/content/common/bluetooth/bluetooth_device.cc
|
| +++ b/content/common/bluetooth/bluetooth_device.cc
|
| @@ -11,6 +11,8 @@ namespace content {
|
| BluetoothDevice::BluetoothDevice()
|
| : id(""),
|
| name(base::string16()),
|
| + tx_power(device::BluetoothDevice::kUnknownPower),
|
| + rssi(device::BluetoothDevice::kUnknownPower),
|
| device_class(0),
|
| vendor_id_source(
|
| device::BluetoothDevice::VendorIDSource::VENDOR_ID_UNKNOWN),
|
| @@ -23,6 +25,8 @@ BluetoothDevice::BluetoothDevice()
|
| BluetoothDevice::BluetoothDevice(
|
| const std::string& id,
|
| const base::string16& name,
|
| + int8_t tx_power,
|
| + int8_t rssi,
|
| uint32 device_class,
|
| device::BluetoothDevice::VendorIDSource vendor_id_source,
|
| uint16 vendor_id,
|
| @@ -32,6 +36,8 @@ BluetoothDevice::BluetoothDevice(
|
| const std::vector<std::string>& uuids)
|
| : id(id),
|
| name(name),
|
| + tx_power(tx_power),
|
| + rssi(rssi),
|
| device_class(device_class),
|
| vendor_id_source(vendor_id_source),
|
| vendor_id(vendor_id),
|
| @@ -53,4 +59,10 @@ std::vector<std::string> BluetoothDevice::UUIDsFromBluetoothUUIDs(
|
| return uuids;
|
| }
|
|
|
| +// static
|
| +int8_t BluetoothDevice::ValidatePower(int16_t power) {
|
| + return ((power < -127) || (power > 127)) ? BluetoothDevice::kUnknownPower
|
| + : power;
|
| +}
|
| +
|
| } // namespace content
|
|
|