Index: ios/chrome/browser/ui/settings/utils/pref_backed_boolean_unittest.mm |
diff --git a/ios/chrome/browser/ui/settings/utils/pref_backed_boolean_unittest.mm b/ios/chrome/browser/ui/settings/utils/pref_backed_boolean_unittest.mm |
index 6ca46bcf2045ea15786e609e13d56314e2550d4e..2584c248b33e7b1b47ed9e93d7eb7b4ee1f58fa8 100644 |
--- a/ios/chrome/browser/ui/settings/utils/pref_backed_boolean_unittest.mm |
+++ b/ios/chrome/browser/ui/settings/utils/pref_backed_boolean_unittest.mm |
@@ -4,6 +4,9 @@ |
#import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h" |
+#include <utility> |
+ |
+#include "base/memory/ptr_util.h" |
#include "base/values.h" |
#include "components/prefs/pref_registry_simple.h" |
#include "components/prefs/testing_pref_service.h" |
@@ -33,8 +36,8 @@ class PrefBackedBooleanTest : public PlatformTest { |
bool GetPref() { return pref_service_.GetBoolean(kTestSwitchPref); } |
void SetPref(bool value) { |
- base::Value* booleanValue = new base::Value(value); |
- pref_service_.SetUserPref(kTestSwitchPref, booleanValue); |
+ auto booleanValue = base::MakeUnique<base::Value>(value); |
+ pref_service_.SetUserPref(kTestSwitchPref, std::move(booleanValue)); |
} |
PrefBackedBoolean* GetObservableBoolean() { return observable_boolean_; } |