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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 62ed74bd9773862370129535b7d1fe560fe28359..88cf22ad6dd59cc068852316c899b656060d756f 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -687,7 +687,7 @@ def _GenerateDefaultValue(value):
return [], 'base::MakeUnique<base::Value>(%s)' %\
json.dumps(value)
elif type(value) == str:
- return [], 'base::MakeUnique<base::StringValue>("%s")' % value
+ return [], 'base::MakeUnique<base::Value>("%s")' % value
elif type(value) == list:
setup = ['auto default_value = base::MakeUnique<base::ListValue>();']
for entry in value:
@@ -1174,7 +1174,7 @@ def _CreateValue(type, arg):
elif type == 'Type::INTEGER':
return 'DecodeIntegerValue(%s)' % arg
elif type == 'Type::STRING':
- return 'new base::StringValue(%s)' % arg
+ return 'new base::Value(%s)' % arg
elif type == 'Type::LIST':
return 'DecodeStringList(%s)' % arg
elif type == 'Type::DICTIONARY' or type == 'TYPE_EXTERNAL':
« 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