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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc

Issue 2782553004: Move TestingPrefService to use unique_ptr<Value> (Closed)
Patch Set: comments Created 3 years, 9 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/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index c0140270ac473e7a8679b85b01af6d5343bed072..c9f69b2c511d070b14e0f8397d71b85937e3f703 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -9,6 +9,7 @@
#include <memory>
#include <string>
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/app/chrome_command_ids.h"
@@ -348,13 +349,13 @@ TEST_F(BookmarkContextMenuControllerTest,
// Disabling the shorcut by policy disables the command.
prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
- new base::Value(false));
+ base::MakeUnique<base::Value>(false));
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT));
// And enabling the shortcut by policy disables the command too.
prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
- new base::Value(true));
+ base::MakeUnique<base::Value>(true));
EXPECT_FALSE(
controller.IsCommandIdEnabled(IDC_BOOKMARK_BAR_SHOW_APPS_SHORTCUT));
}

Powered by Google App Engine
This is Rietveld 408576698