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

Unified Diff: chrome/browser/bookmarks/managed_bookmark_service_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: chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
diff --git a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
index 5d7fd319171cfe9004a3240e81f2e34331c03b4b..2f8053c500f7a8c945882b928a5dc07ed1b24324 100644
--- a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
+++ b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc
@@ -5,6 +5,7 @@
#include "components/bookmarks/managed/managed_bookmark_service.h"
#include <memory>
+#include <utility>
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
@@ -168,7 +169,7 @@ TEST_F(ManagedBookmarkServiceTest, SwapNodes) {
std::unique_ptr<base::ListValue> updated(CreateTestTree());
std::unique_ptr<base::Value> removed;
ASSERT_TRUE(updated->Remove(0, &removed));
- updated->Append(removed.release());
+ updated->Append(std::move(removed));
// These two nodes should just be swapped.
const BookmarkNode* parent = managed_->managed_node();

Powered by Google App Engine
This is Rietveld 408576698