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

Unified Diff: chrome/browser/prefs/chrome_pref_service_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/prefs/chrome_pref_service_unittest.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_unittest.cc b/chrome/browser/prefs/chrome_pref_service_unittest.cc
index 1a181f4b595d4e3ef70af8fa314b268e78120741..512017a2e6cc35d04e2309684c4736d5fd8c0540 100644
--- a/chrome/browser/prefs/chrome_pref_service_unittest.cc
+++ b/chrome/browser/prefs/chrome_pref_service_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/prefs/chrome_command_line_pref_store.h"
#include "chrome/common/chrome_switches.h"
@@ -59,12 +60,14 @@ class ChromePrefServiceWebKitPrefs : public ChromeRenderViewHostTestHarness {
// Set some (WebKit) user preferences.
sync_preferences::TestingPrefServiceSyncable* pref_services =
profile()->GetTestingPrefService();
- pref_services->SetUserPref(prefs::kDefaultCharset, new base::Value("utf8"));
+ pref_services->SetUserPref(prefs::kDefaultCharset,
+ base::MakeUnique<base::Value>("utf8"));
pref_services->SetUserPref(prefs::kWebKitDefaultFontSize,
- new base::Value(20));
+ base::MakeUnique<base::Value>(20));
pref_services->SetUserPref(prefs::kWebKitTextAreasAreResizable,
- new base::Value(false));
- pref_services->SetUserPref("webkit.webprefs.foo", new base::Value("bar"));
+ base::MakeUnique<base::Value>(false));
+ pref_services->SetUserPref("webkit.webprefs.foo",
+ base::MakeUnique<base::Value>("bar"));
}
};
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter_unittest.cc ('k') | chrome/browser/prefs/incognito_mode_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698