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

Unified Diff: chrome/browser/bookmarks/managed_bookmark_service_unittest.cc

Issue 2014103002: Remove deprecated ListValue::Append(Value*) overload on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ADL fail Created 4 years, 3 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
« no previous file with comments | « base/values.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « base/values.cc ('k') | chrome/browser/custom_handlers/protocol_handler_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698