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

Unified Diff: chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership 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/sync/test/integration/two_client_bookmarks_sync_test.cc
diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
index 9b38f3e47e9b75c7acdcb0821f21be81e4e8a77e..c17703f15abe63a8d4c3ceaa15452834ddf6d34c 100644
--- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
@@ -4,6 +4,7 @@
#include <stddef.h>
+#include <memory>
#include <utility>
#include "base/macros.h"
@@ -2207,11 +2208,11 @@ IN_PROC_BROWSER_TEST_F(TwoClientBookmarksSyncTest, ManagedBookmarks) {
// Set the ManagedBookmarks policy for the first Profile,
// which will add one new managed bookmark.
- base::DictionaryValue* bookmark = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> bookmark(new base::DictionaryValue());
bookmark->SetString("name", "Managed bookmark");
bookmark->SetString("url", "youtube.com");
std::unique_ptr<base::ListValue> list(new base::ListValue());
- list->Append(bookmark);
+ list->Append(std::move(bookmark));
policy::PolicyMap policy;
policy.Set(policy::key::kManagedBookmarks, policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD,

Powered by Google App Engine
This is Rietveld 408576698