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

Unified Diff: chrome/browser/profiles/profile_manager_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/profiles/profile_manager_unittest.cc
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index b68675bd87e9fdb44460f7da9ecbfdbcf93126c7..6e0bb934512f2b61da482e64a8246bae20716b8e 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -11,6 +11,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -566,7 +567,7 @@ TEST_F(ProfileManagerTest, AutoloadProfilesWithBackgroundApps) {
ProfileAttributesStorage& storage =
profile_manager->GetProfileAttributesStorage();
local_state_.Get()->SetUserPref(prefs::kBackgroundModeEnabled,
- new base::Value(true));
+ base::MakeUnique<base::Value>(true));
// Setting a pref which is not applicable to a system (i.e., Android in this
// case) does not necessarily create it. Don't bother continuing with the
@@ -601,7 +602,7 @@ TEST_F(ProfileManagerTest, DoNotAutoloadProfilesIfBackgroundModeOff) {
ProfileAttributesStorage& storage =
profile_manager->GetProfileAttributesStorage();
local_state_.Get()->SetUserPref(prefs::kBackgroundModeEnabled,
- new base::Value(false));
+ base::MakeUnique<base::Value>(false));
EXPECT_EQ(0u, storage.GetNumberOfProfiles());

Powered by Google App Engine
This is Rietveld 408576698