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

Unified Diff: extensions/browser/api/storage/settings_test_util.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/storage/settings_test_util.cc
diff --git a/extensions/browser/api/storage/settings_test_util.cc b/extensions/browser/api/storage/settings_test_util.cc
index 1a363fabfe778d054f0d9b6ba1ca3d8d8236985a..aaa9840382c6665b1cf8701767f8db3020f4f519 100644
--- a/extensions/browser/api/storage/settings_test_util.cc
+++ b/extensions/browser/api/storage/settings_test_util.cc
@@ -29,7 +29,7 @@ std::unique_ptr<base::Value> CreateKilobyte() {
std::unique_ptr<base::Value> CreateMegabyte() {
base::ListValue* megabyte = new base::ListValue();
for (int i = 0; i < 1000; ++i) {
- megabyte->Append(CreateKilobyte().release());
+ megabyte->Append(CreateKilobyte());
}
return std::unique_ptr<base::Value>(megabyte);
}

Powered by Google App Engine
This is Rietveld 408576698