Index: chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc |
diff --git a/chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc b/chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc |
index 47d4a46b6cf52314cf025036cd992b8956d21d79..5ddfe5c4ae05bb2de8e0094b45be2c755cfad3b1 100644 |
--- a/chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc |
+++ b/chrome/browser/chromeos/policy/auto_enrollment_client_unittest.cc |
@@ -9,6 +9,7 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
#include "base/macros.h" |
+#include "base/memory/ptr_util.h" |
#include "base/message_loop/message_loop.h" |
#include "base/run_loop.h" |
#include "base/strings/stringprintf.h" |
@@ -426,9 +427,10 @@ TEST_F(AutoEnrollmentClientTest, ReuseCachedDecision) { |
EXPECT_CALL(*service_, |
CreateJob(DeviceManagementRequestJob::TYPE_AUTO_ENROLLMENT, _)) |
.Times(0); |
- local_state_->SetUserPref(prefs::kShouldAutoEnroll, new base::Value(true)); |
+ local_state_->SetUserPref(prefs::kShouldAutoEnroll, |
+ base::MakeUnique<base::Value>(true)); |
local_state_->SetUserPref(prefs::kAutoEnrollmentPowerLimit, |
- new base::Value(8)); |
+ base::MakeUnique<base::Value>(8)); |
// Note that device state will be retrieved every time, regardless of any |
// cached information. This is intentional, the idea is that device state on |
@@ -446,9 +448,10 @@ TEST_F(AutoEnrollmentClientTest, ReuseCachedDecision) { |
} |
TEST_F(AutoEnrollmentClientTest, RetryIfPowerLargerThanCached) { |
- local_state_->SetUserPref(prefs::kShouldAutoEnroll, new base::Value(false)); |
+ local_state_->SetUserPref(prefs::kShouldAutoEnroll, |
+ base::MakeUnique<base::Value>(false)); |
local_state_->SetUserPref(prefs::kAutoEnrollmentPowerLimit, |
- new base::Value(8)); |
+ base::MakeUnique<base::Value>(8)); |
CreateClient(kStateKey, 5, 10); |
ServerWillReply(-1, true, true); |
ServerWillSendState( |