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

Unified Diff: extensions/browser/api/bluetooth/bluetooth_private_api.cc

Issue 2137013005: [Extensions] Code Cleanup - Remove redundant smart-ptr get()s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: extensions/browser/api/bluetooth/bluetooth_private_api.cc
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.cc b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
index 0ba6c01ea85b57eb6363f62d9fc21372530ef396..86fc88cb051ad3526e8f5912182c1f836961afe2 100644
--- a/extensions/browser/api/bluetooth/bluetooth_private_api.cc
+++ b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
@@ -102,8 +102,8 @@ bool ValidatePairingResponseOptions(
const device::BluetoothDevice* device,
const bt_private::SetPairingResponseOptions& options) {
bool response = options.response != bt_private::PAIRING_RESPONSE_NONE;
- bool pincode = options.pincode.get() != nullptr;
- bool passkey = options.passkey.get() != nullptr;
+ bool pincode = options.pincode != nullptr;
+ bool passkey = options.passkey != nullptr;
if (!response && !pincode && !passkey)
return false;
@@ -280,9 +280,9 @@ bool BluetoothPrivateSetPairingResponseFunction::DoWork(
}
if (options.pincode.get()) {
- device->SetPinCode(*options.pincode.get());
+ device->SetPinCode(*options.pincode);
} else if (options.passkey.get()) {
- device->SetPasskey(*options.passkey.get());
+ device->SetPasskey(*options.passkey);
} else {
switch (options.response) {
case bt_private::PAIRING_RESPONSE_CONFIRM:

Powered by Google App Engine
This is Rietveld 408576698