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

Unified Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
index 3651cf5887392e9e7b4d7707963fdb5666ceda04..a3e5ae012246b2daf623fc3628f6eea8941a36f1 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc
@@ -1064,7 +1064,7 @@ void BluetoothLowEnergyEventRouter::GattCharacteristicValueChanged(
apibtle::Characteristic api_characteristic;
PopulateCharacteristic(characteristic, &api_characteristic);
std::unique_ptr<base::ListValue> args(new base::ListValue());
- args->Append(apibtle::CharacteristicToValue(&api_characteristic).release());
+ args->Append(apibtle::CharacteristicToValue(&api_characteristic));
DispatchEventToExtensionsWithPermission(
events::BLUETOOTH_LOW_ENERGY_ON_CHARACTERISTIC_VALUE_CHANGED,
@@ -1095,7 +1095,7 @@ void BluetoothLowEnergyEventRouter::GattDescriptorValueChanged(
apibtle::Descriptor api_descriptor;
PopulateDescriptor(descriptor, &api_descriptor);
std::unique_ptr<base::ListValue> args(new base::ListValue());
- args->Append(apibtle::DescriptorToValue(&api_descriptor).release());
+ args->Append(apibtle::DescriptorToValue(&api_descriptor));
DispatchEventToExtensionsWithPermission(
events::BLUETOOTH_LOW_ENERGY_ON_DESCRIPTOR_VALUE_CHANGED,

Powered by Google App Engine
This is Rietveld 408576698