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

Unified Diff: tools/grit/grit/util.py

Issue 1458653002: New build flag system, convert Google Now flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chrome/common/pref_names.cc ('k') | tools/grit/grit_rule.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/util.py
diff --git a/tools/grit/grit/util.py b/tools/grit/grit/util.py
index b958bc22db2a011ea593977548dd9aa6bbd80e4a..93dce2610074cdef7fbc0190e3e36d3950d1d94f 100755
--- a/tools/grit/grit/util.py
+++ b/tools/grit/grit/util.py
@@ -483,7 +483,8 @@ def ParseDefine(define):
'''Parses a define argument and returns the name and value.
The format is either "NAME=VAL" or "NAME", using True as the default value.
- Values of "1" and "0" are transformed to True and False respectively.
+ Values of "1"/"true" and "0"/"false" are transformed to True and False
+ respectively.
Args:
define: a string of the form "NAME=VAL" or "NAME".
@@ -497,8 +498,8 @@ def ParseDefine(define):
val = True
if len(parts) > 1:
val = parts[1]
- if val == "1": val = True
- elif val == "0": val = False
+ if val == "1" or val == "true": val = True
+ elif val == "0" or val == "false": val = False
return (name, val)
« no previous file with comments | « chrome/common/pref_names.cc ('k') | tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698