summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2015-11-25 14:24:44 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-25 22:25:43 +0000
commitc7cde6acb654b2c9cef527c0e8ac262d480c9f06 (patch)
tree1732b7fd0e4832ea9b5e122b80dd74e45e50a6d0 /tools/grit
parentd4bd2aafb9eb736fa1cf3844cb389c30d91aa7db (diff)
downloadchromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.zip
chromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.tar.gz
chromium_src-c7cde6acb654b2c9cef527c0e8ac262d480c9f06.tar.bz2
Revert of New build flag system, convert Google Now flag (patchset #2 id:20001 of https://codereview.chromium.org/1475513006/ )
Reason for revert: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20x64%20Builder%20%28dbg%29/builds/69779/steps/compile/logs/stdio Original issue's description: > New build flag system, convert Google Now flag > > This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included. > > Converts Google Now to use this and remove the global google now define and grit define. > > Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False"). > > Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency. > > Reland of https://codereview.chromium.org/1458653002/ > TBR=mark@chromium.org > > Committed: https://crrev.com/cbc1cd295bc85219ad89326457cd7f5cf003d41c > Cr-Commit-Position: refs/heads/master@{#361741} TBR=mark@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1480693003 Cr-Commit-Position: refs/heads/master@{#361749}
Diffstat (limited to 'tools/grit')
-rwxr-xr-xtools/grit/grit/util.py7
-rw-r--r--tools/grit/grit_rule.gni7
2 files changed, 10 insertions, 4 deletions
diff --git a/tools/grit/grit/util.py b/tools/grit/grit/util.py
index 93dce26..b958bc2 100755
--- a/tools/grit/grit/util.py
+++ b/tools/grit/grit/util.py
@@ -483,8 +483,7 @@ 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"/"true" and "0"/"false" are transformed to True and False
- respectively.
+ Values of "1" and "0" are transformed to True and False respectively.
Args:
define: a string of the form "NAME=VAL" or "NAME".
@@ -498,8 +497,8 @@ def ParseDefine(define):
val = True
if len(parts) > 1:
val = parts[1]
- if val == "1" or val == "true": val = True
- elif val == "0" or val == "false": val = False
+ if val == "1": val = True
+ elif val == "0": val = False
return (name, val)
diff --git a/tools/grit/grit_rule.gni b/tools/grit/grit_rule.gni
index f60d8fa..083e3d9 100644
--- a/tools/grit/grit_rule.gni
+++ b/tools/grit/grit_rule.gni
@@ -244,6 +244,13 @@ if (enable_settings_app) {
"enable_settings_app",
]
}
+if (enable_google_now) {
+ grit_defines += [
+ "-D",
+ "enable_google_now",
+ ]
+}
+
if (enable_webrtc) {
grit_defines += [
"-D",