| Index: extensions/browser/api/bluetooth/bluetooth_api_utils.cc
|
| diff --git a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
|
| index 1b0c61e64e886010ca239c5f866160f168b9f775..62a5b8eee63a5a83cab42e278dadb8a23a3cd1fd 100644
|
| --- a/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
|
| +++ b/extensions/browser/api/bluetooth/bluetooth_api_utils.cc
|
| @@ -121,13 +121,13 @@ void BluetoothDeviceToApiDevice(const device::BluetoothDevice& device,
|
| string_uuids->push_back(iter->canonical_value());
|
| out->uuids.reset(string_uuids);
|
|
|
| - if (device.GetInquiryRSSI() != device::BluetoothDevice::kUnknownPower)
|
| - out->inquiry_rssi.reset(new int(device.GetInquiryRSSI()));
|
| + if (device.GetInquiryRSSI())
|
| + out->inquiry_rssi.reset(new int(device.GetInquiryRSSI().value()));
|
| else
|
| out->inquiry_rssi.reset();
|
|
|
| - if (device.GetInquiryTxPower() != device::BluetoothDevice::kUnknownPower)
|
| - out->inquiry_tx_power.reset(new int(device.GetInquiryTxPower()));
|
| + if (device.GetInquiryTxPower())
|
| + out->inquiry_tx_power.reset(new int(device.GetInquiryTxPower().value()));
|
| else
|
| out->inquiry_tx_power.reset();
|
| }
|
|
|