Standardize grit invokes

- Add two gypi files to src/build for the boilerplate added to targets and actions
- Update grit_info to also support the -E flag so it can share more of the grit build commandline
- switch over all but the webkit and webkit glue grd files to use the common support


BUG=22247
TEST=everything still localized correctly
Review URL: http://codereview.chromium.org/6705030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79548 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 644c9ed..b911258 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -494,13 +494,15 @@
         'use_gconf%': 1,
       }],
 
-      # Setup -D flags passed into grit.
+      # Set up -D and -E flags passed into grit.
       ['branding=="Chrome"', {
         # TODO(mmoss) The .grd files look for _google_chrome, but for
         # consistency they should look for google_chrome_build like C++.
-        'grit_defines': ['-D', '_google_chrome'],
+        'grit_defines': ['-D', '_google_chrome',
+                         '-E', 'CHROMIUM_BUILD=google_chrome'],
       }, {
-        'grit_defines': ['-D', '_chromium'],
+        'grit_defines': ['-D', '_chromium',
+                         '-E', 'CHROMIUM_BUILD=chromium'],
       }],
       ['chromeos==1', {
         'grit_defines': ['-D', 'chromeos'],
@@ -1529,7 +1531,7 @@
               'psapi.lib',
               'dbghelp.lib',
             ],
-            'conditions': [ 
+            'conditions': [
               ['msvs_express', {
                 # Explicitly required when using the ATL with express
                 'AdditionalDependencies': [