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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc
index 0783205eb22fce5270b5b9a8c769b085bbda4385..0aa2d8236a6d9b865eccae70cca3920d33e9bef0 100644
--- a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate_unittest.cc
@@ -13,6 +13,7 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "chrome/browser/safe_browsing/incident_reporting/incident.h"
#include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver.h"
@@ -129,7 +130,7 @@ class PreferenceValidationDelegateValues
using base::Value;
switch (value_type) {
case Value::Type::NONE:
- return Value::CreateNullValue();
+ return base::MakeUnique<base::Value>();
case Value::Type::BOOLEAN:
return std::unique_ptr<Value>(new base::Value(false));
case Value::Type::INTEGER:
@@ -212,7 +213,7 @@ class PreferenceValidationDelegateNoIncident
TEST_P(PreferenceValidationDelegateNoIncident, Atomic) {
instance_->OnAtomicPreferenceValidation(
- kPrefPath, base::Value::CreateNullValue(), value_state_,
+ kPrefPath, base::MakeUnique<base::Value>(), value_state_,
external_validation_value_state_, false /* is_personal */);
EXPECT_EQ(0U, incidents_.size());
}
@@ -255,7 +256,7 @@ class PreferenceValidationDelegateWithIncident
TEST_P(PreferenceValidationDelegateWithIncident, Atomic) {
instance_->OnAtomicPreferenceValidation(
- kPrefPath, base::Value::CreateNullValue(), value_state_,
+ kPrefPath, base::MakeUnique<base::Value>(), value_state_,
external_validation_value_state_, is_personal_);
ASSERT_EQ(1U, incidents_.size());
std::unique_ptr<safe_browsing::ClientIncidentReport_IncidentData> incident(

Powered by Google App Engine
This is Rietveld 408576698