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

Unified Diff: components/policy/core/common/registry_dict.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
Index: components/policy/core/common/registry_dict.cc
diff --git a/components/policy/core/common/registry_dict.cc b/components/policy/core/common/registry_dict.cc
index ca7df29e72b4e40b3562257b7a102271dd6149db..86e682493ee9775d44a5ece4f033bc0675d5494c 100644
--- a/components/policy/core/common/registry_dict.cc
+++ b/components/policy/core/common/registry_dict.cc
@@ -83,8 +83,7 @@ std::unique_ptr<base::Value> ConvertValue(const base::Value& value,
if (value.GetAsInteger(&int_value) ||
(value.GetAsString(&string_value) &&
base::StringToInt(string_value, &int_value))) {
- return std::unique_ptr<base::Value>(
- new base::FundamentalValue(int_value != 0));
+ return std::unique_ptr<base::Value>(new base::Value(int_value != 0));
}
break;
}
@@ -92,8 +91,7 @@ std::unique_ptr<base::Value> ConvertValue(const base::Value& value,
// Integers may be string-encoded.
if (value.GetAsString(&string_value) &&
base::StringToInt(string_value, &int_value)) {
- return std::unique_ptr<base::Value>(
- new base::FundamentalValue(int_value));
+ return std::unique_ptr<base::Value>(new base::Value(int_value));
}
break;
}
@@ -103,8 +101,7 @@ std::unique_ptr<base::Value> ConvertValue(const base::Value& value,
if (value.GetAsDouble(&double_value) ||
(value.GetAsString(&string_value) &&
base::StringToDouble(string_value, &double_value))) {
- return std::unique_ptr<base::Value>(
- new base::FundamentalValue(double_value));
+ return std::unique_ptr<base::Value>(new base::Value(double_value));
}
break;
}
@@ -274,9 +271,8 @@ void RegistryDict::ReadRegistry(HKEY hive, const base::string16& root) {
dword_value = base::NetToHost32(dword_value);
else
dword_value = base::ByteSwapToLE32(dword_value);
- SetValue(name,
- std::unique_ptr<base::Value>(new base::FundamentalValue(
- static_cast<int>(dword_value))));
+ SetValue(name, std::unique_ptr<base::Value>(
+ new base::Value(static_cast<int>(dword_value))));
continue;
}
case REG_NONE:
« no previous file with comments | « components/policy/core/common/preg_parser_unittest.cc ('k') | components/policy/core/common/registry_dict_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698