| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/preference_validation_
delegate.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/preference_validation_
delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 switch (value_type) { | 132 switch (value_type) { |
| 133 case Value::Type::NONE: | 133 case Value::Type::NONE: |
| 134 return Value::CreateNullValue(); | 134 return Value::CreateNullValue(); |
| 135 case Value::Type::BOOLEAN: | 135 case Value::Type::BOOLEAN: |
| 136 return std::unique_ptr<Value>(new base::Value(false)); | 136 return std::unique_ptr<Value>(new base::Value(false)); |
| 137 case Value::Type::INTEGER: | 137 case Value::Type::INTEGER: |
| 138 return std::unique_ptr<Value>(new base::Value(47)); | 138 return std::unique_ptr<Value>(new base::Value(47)); |
| 139 case Value::Type::DOUBLE: | 139 case Value::Type::DOUBLE: |
| 140 return std::unique_ptr<Value>(new base::Value(0.47)); | 140 return std::unique_ptr<Value>(new base::Value(0.47)); |
| 141 case Value::Type::STRING: | 141 case Value::Type::STRING: |
| 142 return std::unique_ptr<Value>(new base::StringValue("i have a spleen")); | 142 return std::unique_ptr<Value>(new base::Value("i have a spleen")); |
| 143 case Value::Type::DICTIONARY: { | 143 case Value::Type::DICTIONARY: { |
| 144 std::unique_ptr<base::DictionaryValue> value( | 144 std::unique_ptr<base::DictionaryValue> value( |
| 145 new base::DictionaryValue()); | 145 new base::DictionaryValue()); |
| 146 value->SetInteger("twenty-two", 22); | 146 value->SetInteger("twenty-two", 22); |
| 147 value->SetInteger("forty-seven", 47); | 147 value->SetInteger("forty-seven", 47); |
| 148 return std::move(value); | 148 return std::move(value); |
| 149 } | 149 } |
| 150 case Value::Type::LIST: { | 150 case Value::Type::LIST: { |
| 151 std::unique_ptr<base::ListValue> value(new base::ListValue()); | 151 std::unique_ptr<base::ListValue> value(new base::ListValue()); |
| 152 value->AppendInteger(22); | 152 value->AppendInteger(22); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 INSTANTIATE_TEST_CASE_P( | 342 INSTANTIATE_TEST_CASE_P( |
| 343 WithIncidentIgnoreBypass, | 343 WithIncidentIgnoreBypass, |
| 344 PreferenceValidationDelegateWithIncident, | 344 PreferenceValidationDelegateWithIncident, |
| 345 testing::Combine( | 345 testing::Combine( |
| 346 testing::Values(PrefHashStoreTransaction::CLEARED, | 346 testing::Values(PrefHashStoreTransaction::CLEARED, |
| 347 PrefHashStoreTransaction::CHANGED, | 347 PrefHashStoreTransaction::CHANGED, |
| 348 PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE), | 348 PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE), |
| 349 testing::Values(PrefHashStoreTransaction::CHANGED, | 349 testing::Values(PrefHashStoreTransaction::CHANGED, |
| 350 PrefHashStoreTransaction::CLEARED), | 350 PrefHashStoreTransaction::CLEARED), |
| 351 testing::Bool())); | 351 testing::Bool())); |
| OLD | NEW |