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

Unified Diff: components/policy/tools/generate_policy_source.py

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/tools/generate_policy_source.py
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
index 889038aa97b71d57f4005fe85977998c8b133d27..62ed74bd9773862370129535b7d1fe560fe28359 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -684,7 +684,7 @@ def _GenerateDefaultValue(value):
|value|: The deserialized value to convert to base::Value."""
if type(value) == bool or type(value) == int:
- return [], 'base::MakeUnique<base::FundamentalValue>(%s)' %\
+ return [], 'base::MakeUnique<base::Value>(%s)' %\
json.dumps(value)
elif type(value) == str:
return [], 'base::MakeUnique<base::StringValue>("%s")' % value
@@ -1133,7 +1133,7 @@ std::unique_ptr<base::Value> DecodeIntegerValue(
}
return base::WrapUnique(
- new base::FundamentalValue(static_cast<int>(value)));
+ new base::Value(static_cast<int>(value)));
}
std::unique_ptr<base::ListValue> DecodeStringList(
@@ -1170,7 +1170,7 @@ CPP_FOOT = '''}
def _CreateValue(type, arg):
if type == 'Type::BOOLEAN':
- return 'new base::FundamentalValue(%s)' % arg
+ return 'new base::Value(%s)' % arg
elif type == 'Type::INTEGER':
return 'DecodeIntegerValue(%s)' % arg
elif type == 'Type::STRING':
« no previous file with comments | « components/policy/core/common/schema_unittest.cc ('k') | components/policy/tools/generate_policy_source_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698