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

Unified Diff: extensions/browser/api/system_info/system_info_api.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: extensions/browser/api/system_info/system_info_api.cc
diff --git a/extensions/browser/api/system_info/system_info_api.cc b/extensions/browser/api/system_info/system_info_api.cc
index dbd983761502a83ea42aba7b0120162abf5f1a7f..163439116301ee938548cebb92f4254215e5d9eb 100644
--- a/extensions/browser/api/system_info/system_info_api.cc
+++ b/extensions/browser/api/system_info/system_info_api.cc
@@ -167,7 +167,7 @@ void SystemInfoEventRouter::OnRemovableStorageAttached(
StorageUnitInfo unit;
systeminfo::BuildStorageUnitInfo(info, &unit);
std::unique_ptr<base::ListValue> args(new base::ListValue);
- args->Append(unit.ToValue().release());
+ args->Append(unit.ToValue());
DispatchEvent(events::SYSTEM_STORAGE_ON_ATTACHED,
system_storage::OnAttached::kEventName, std::move(args));
}

Powered by Google App Engine
This is Rietveld 408576698