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

Unified Diff: chrome/browser/chromeos/system/automatic_reboot_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/chromeos/system/automatic_reboot_manager_unittest.cc
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
index 34b8df8881d437ece7fbb774815f2e3eed5cee85..33070ea6c8f1a5f326a02214b6abd34c9d6991a1 100644
--- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
+++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
@@ -374,8 +374,9 @@ void AutomaticRebootManagerBasicTest::SetRebootAfterUpdate(
bool reboot_after_update,
bool expect_reboot) {
reboot_after_update_ = reboot_after_update;
- local_state_.SetManagedPref(prefs::kRebootAfterUpdate,
- new base::Value(reboot_after_update));
+ local_state_.SetManagedPref(
+ prefs::kRebootAfterUpdate,
+ base::MakeUnique<base::Value>(reboot_after_update));
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,
power_manager_client_->num_request_restart_calls());
@@ -390,7 +391,7 @@ void AutomaticRebootManagerBasicTest::SetUptimeLimit(
} else {
local_state_.SetManagedPref(
prefs::kUptimeLimit,
- new base::Value(static_cast<int>(limit.InSeconds())));
+ base::MakeUnique<base::Value>(static_cast<int>(limit.InSeconds())));
}
task_runner_->RunUntilIdle();
EXPECT_EQ(expect_reboot ? 1 : 0,

Powered by Google App Engine
This is Rietveld 408576698