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 9d6ddec2585343ad4e65bcc4e779f79c6bdf8b82..847c27a5463b636a97782d26339c009877a9f3b9 100644 |
--- a/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc |
+++ b/chrome/browser/bookmarks/managed_bookmark_service_unittest.cc |
@@ -8,6 +8,7 @@ |
#include <utility> |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "chrome/browser/bookmarks/bookmark_model_factory.h" |
@@ -63,18 +64,20 @@ class ManagedBookmarkServiceTest : public testing::Test { |
DCHECK(managed_); |
} |
- 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(); |
+ auto dict = base::MakeUnique<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) { |
+ auto dict = base::MakeUnique<base::DictionaryValue>(); |
dict->SetString("name", title); |
dict->Set("children", children); |
return dict; |
@@ -93,7 +96,7 @@ class ManagedBookmarkServiceTest : public testing::Test { |
return list; |
} |
- static base::DictionaryValue* CreateExpectedTree() { |
+ static std::unique_ptr<base::DictionaryValue> CreateExpectedTree() { |
return CreateFolder(GetManagedFolderTitle(), CreateTestTree()); |
} |