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

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

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 6 years, 5 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 4fbd2d03f9ca2ee9dba3e818a9a712dd2013d73f..b886b8a547ea21d95992400cc8ac199bfb9713d8 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -825,7 +825,7 @@ base::ListValue* DecodeStringList(const em::StringList& string_list) {
RepeatedPtrField<std::string>::const_iterator entry;
for (entry = string_list.entries().begin();
entry != string_list.entries().end(); ++entry) {
- list_value->Append(base::Value::CreateStringValue(*entry));
+ list_value->AppendString(*entry);
}
return list_value;
}
@@ -860,7 +860,7 @@ def _CreateValue(type, arg):
elif type == 'TYPE_INTEGER':
return 'DecodeIntegerValue(%s)' % arg
elif type == 'TYPE_STRING':
- return 'base::Value::CreateStringValue(%s)' % arg
+ return 'new base::StringValue(%s)' % arg
elif type == 'TYPE_LIST':
return 'DecodeStringList(%s)' % arg
elif type == 'TYPE_DICTIONARY' or type == 'TYPE_EXTERNAL':

Powered by Google App Engine
This is Rietveld 408576698