Index: components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc |
diff --git a/components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc b/components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc |
index a3d3bb256aec74f46dc06e144e87f9e6eb621afa..2bd3ad6d57580243bcc630ae4a09e018d88be820 100644 |
--- a/components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc |
+++ b/components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc |
@@ -98,18 +98,20 @@ class ManagedBookmarksTrackerTest : public testing::Test { |
return node && node->HasAncestor(managed_node_); |
} |
- static base::DictionaryValue* CreateBookmark(const std::string& title, |
- const std::string& url) { |
+ static std::unique_ptr<base::DictionaryValue> CreateBookmark( |
+ const std::string& title, |
+ const std::string& url) { |
EXPECT_TRUE(GURL(url).is_valid()); |
- base::DictionaryValue* dict = new base::DictionaryValue(); |
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
dict->SetString("name", title); |
dict->SetString("url", GURL(url).spec()); |
return dict; |
} |
- static base::DictionaryValue* CreateFolder(const std::string& title, |
- base::ListValue* children) { |
- base::DictionaryValue* dict = new base::DictionaryValue(); |
+ static std::unique_ptr<base::DictionaryValue> CreateFolder( |
+ const std::string& title, |
+ base::ListValue* children) { |
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
dict->SetString("name", title); |
dict->Set("children", children); |
return dict; |
@@ -137,7 +139,7 @@ class ManagedBookmarksTrackerTest : public testing::Test { |
IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME); |
} |
- static base::DictionaryValue* CreateExpectedTree() { |
+ static std::unique_ptr<base::DictionaryValue> CreateExpectedTree() { |
return CreateFolder(GetManagedFolderTitle(), CreateTestTree()); |
} |