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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 | « components/policy/core/common/schema_unittest.cc ('k') | components/prefs/command_line_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 04445612e51e84db03ddbd97a2e572c1794141c3..9a723a8a0b6abbfb02ba101b18cf13269899ef78 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -737,10 +737,10 @@ def _WritePolicyConstantSource(policies, os, f, riskTags):
for policy in policies:
if policy.has_enterprise_default:
if policy.policy_type == 'TYPE_BOOLEAN':
- creation_expression = 'new base::FundamentalValue(%s)' %\
+ creation_expression = 'new base::Value(%s)' %\
('true' if policy.enterprise_default else 'false')
elif policy.policy_type == 'TYPE_INTEGER':
- creation_expression = 'new base::FundamentalValue(%s)' %\
+ creation_expression = 'new base::Value(%s)' %\
policy.enterprise_default
elif policy.policy_type == 'TYPE_STRING':
creation_expression = 'new base::StringValue("%s")' %\
@@ -1036,7 +1036,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(
@@ -1073,7 +1073,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/prefs/command_line_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698