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

Unified Diff: extensions/browser/event_listener_map_unittest.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/event_listener_map_unittest.cc
diff --git a/extensions/browser/event_listener_map_unittest.cc b/extensions/browser/event_listener_map_unittest.cc
index 0b691cef623bd9bd49925a3f561ebf7919781df3..4391b2cf816f8182551ec972a293a7629cfe92a6 100644
--- a/extensions/browser/event_listener_map_unittest.cc
+++ b/extensions/browser/event_listener_map_unittest.cc
@@ -4,6 +4,8 @@
#include "extensions/browser/event_listener_map.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "content/public/test/mock_render_process_host.h"
@@ -54,7 +56,7 @@ class EventListenerMapTest : public testing::Test {
filter_dict->Set("hostSuffix", new StringValue(suffix));
- filter_list->Append(filter_dict.release());
+ filter_list->Append(std::move(filter_dict));
filter->Set("url", filter_list.release());
return filter;
}
@@ -360,8 +362,8 @@ TEST_F(EventListenerMapTest, AddLazyListenersFromPreferences) {
ListValue* filter_list = new ListValue();
filtered_listeners.Set(kEvent1Name, filter_list);
- filter_list->Append(filter1.release());
- filter_list->Append(filter2.release());
+ filter_list->Append(std::move(filter1));
+ filter_list->Append(std::move(filter2));
listeners_->LoadFilteredLazyListeners(kExt1Id, filtered_listeners);

Powered by Google App Engine
This is Rietveld 408576698