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

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

Issue 2803023005: Switch base::Value typemapping to be by value instead of by unique_ptr.
Patch Set: 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..7262d99d1c5c41501e40c84953067816980e0bf8 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
@@ -99,9 +99,9 @@ class PreferenceValidationDelegateTest : public testing::Test {
// Tests that a NULL value results in an incident with no value.
TEST_F(PreferenceValidationDelegateTest, NullValue) {
- instance_->OnAtomicPreferenceValidation(kPrefPath, NULL, ValueState::CLEARED,
- ValueState::UNSUPPORTED,
- false /* is_personal */);
+ instance_->OnAtomicPreferenceValidation(
+ kPrefPath, base::nullopt, ValueState::CLEARED, ValueState::UNSUPPORTED,
+ false /* is_personal */);
std::unique_ptr<safe_browsing::ClientIncidentReport_IncidentData> incident(
incidents_.back()->TakePayload());
EXPECT_FALSE(incident->tracked_preference().has_atomic_value());
@@ -163,7 +163,7 @@ class PreferenceValidationDelegateValues
TEST_P(PreferenceValidationDelegateValues, Value) {
instance_->OnAtomicPreferenceValidation(
- kPrefPath, MakeValue(value_type_), ValueState::CLEARED,
+ kPrefPath, *MakeValue(value_type_), ValueState::CLEARED,
ValueState::UNSUPPORTED, false /* is_personal */);
ASSERT_EQ(1U, incidents_.size());
std::unique_ptr<safe_browsing::ClientIncidentReport_IncidentData> incident(
@@ -212,7 +212,7 @@ class PreferenceValidationDelegateNoIncident
TEST_P(PreferenceValidationDelegateNoIncident, Atomic) {
instance_->OnAtomicPreferenceValidation(
- kPrefPath, base::Value::CreateNullValue(), value_state_,
+ kPrefPath, *base::Value::CreateNullValue(), value_state_,
external_validation_value_state_, false /* is_personal */);
EXPECT_EQ(0U, incidents_.size());
}
@@ -255,7 +255,7 @@ class PreferenceValidationDelegateWithIncident
TEST_P(PreferenceValidationDelegateWithIncident, Atomic) {
instance_->OnAtomicPreferenceValidation(
- kPrefPath, base::Value::CreateNullValue(), value_state_,
+ kPrefPath, *base::Value::CreateNullValue(), 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