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

Unified Diff: base/values.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index 1a66c4ef7eda99b3440631f6d9e2fc5bae51f641..9aa04f33c64b1cc1eee031f1e89b03ed7b5bb358 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -353,14 +353,12 @@ Value* Value::DeepCopy() const {
case Type::NONE:
return CreateNullValue().release();
- // For now, make FundamentalValues for backward-compatibility. Convert to
- // Value when that code is deleted.
case Type::BOOLEAN:
- return new FundamentalValue(bool_value_);
+ return new Value(bool_value_);
case Type::INTEGER:
- return new FundamentalValue(int_value_);
+ return new Value(int_value_);
case Type::DOUBLE:
- return new FundamentalValue(double_value_);
+ return new Value(double_value_);
// For now, make StringValues for backward-compatibility. Convert to
// Value when that code is deleted.
case Type::STRING:
@@ -673,15 +671,15 @@ void DictionaryValue::Set(StringPiece path, Value* in_value) {
}
void DictionaryValue::SetBoolean(StringPiece path, bool in_value) {
- Set(path, new FundamentalValue(in_value));
+ Set(path, new Value(in_value));
}
void DictionaryValue::SetInteger(StringPiece path, int in_value) {
- Set(path, new FundamentalValue(in_value));
+ Set(path, new Value(in_value));
}
void DictionaryValue::SetDouble(StringPiece path, double in_value) {
- Set(path, new FundamentalValue(in_value));
+ Set(path, new Value(in_value));
}
void DictionaryValue::SetString(StringPiece path, StringPiece in_value) {
@@ -704,20 +702,17 @@ void DictionaryValue::SetWithoutPathExpansion(StringPiece key,
void DictionaryValue::SetBooleanWithoutPathExpansion(StringPiece path,
bool in_value) {
- SetWithoutPathExpansion(path,
- base::MakeUnique<base::FundamentalValue>(in_value));
+ SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
}
void DictionaryValue::SetIntegerWithoutPathExpansion(StringPiece path,
int in_value) {
- SetWithoutPathExpansion(path,
- base::MakeUnique<base::FundamentalValue>(in_value));
+ SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
}
void DictionaryValue::SetDoubleWithoutPathExpansion(StringPiece path,
double in_value) {
- SetWithoutPathExpansion(path,
- base::MakeUnique<base::FundamentalValue>(in_value));
+ SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
}
void DictionaryValue::SetStringWithoutPathExpansion(StringPiece path,
@@ -1274,15 +1269,15 @@ void ListValue::Append(Value* in_value) {
#endif
void ListValue::AppendBoolean(bool in_value) {
- Append(MakeUnique<FundamentalValue>(in_value));
+ Append(MakeUnique<Value>(in_value));
}
void ListValue::AppendInteger(int in_value) {
- Append(MakeUnique<FundamentalValue>(in_value));
+ Append(MakeUnique<Value>(in_value));
}
void ListValue::AppendDouble(double in_value) {
- Append(MakeUnique<FundamentalValue>(in_value));
+ Append(MakeUnique<Value>(in_value));
}
void ListValue::AppendString(StringPiece in_value) {
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698