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

Side by Side Diff: grit/node/misc.py

Issue 691873002: Add support to override output_all_resource_defines from command line. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | grit/tool/build.py » ('j') | grit/tool/build.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Miscellaneous node types. 6 """Miscellaneous node types.
7 """ 7 """
8 8
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 if hasattr(self, 'base_dir'): 285 if hasattr(self, 'base_dir'):
286 return self.base_dir 286 return self.base_dir
287 else: 287 else:
288 return self.GetOriginalBaseDir() 288 return self.GetOriginalBaseDir()
289 289
290 def GetOriginalBaseDir(self): 290 def GetOriginalBaseDir(self):
291 """Returns the base directory, as set in the .grd file. 291 """Returns the base directory, as set in the .grd file.
292 """ 292 """
293 return self.attrs['base_dir'] 293 return self.attrs['base_dir']
294 294
295 def SetShouldOutputAllResourceDefines(self, value):
296 """Overrides the value of output_all_resource_defines found in the grd file.
297 """
298 self.attrs['output_all_resource_defines'] = 'true' if value else 'false'
299
295 def ShouldOutputAllResourceDefines(self): 300 def ShouldOutputAllResourceDefines(self):
296 """Returns true if all resource defines should be output, false if 301 """Returns true if all resource defines should be output, false if
297 defines for resources not emitted to resource files should be 302 defines for resources not emitted to resource files should be
298 skipped. 303 skipped.
299 """ 304 """
300 return self.attrs['output_all_resource_defines'] == 'true' 305 return self.attrs['output_all_resource_defines'] == 'true'
301 306
302 def GetRcHeaderFormat(self): 307 def GetRcHeaderFormat(self):
303 return self.attrs['rc_header_format'] 308 return self.attrs['rc_header_format']
304 309
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 by parameters of the same name. 526 by parameters of the same name.
522 """ 527 """
523 node = IdentifierNode() 528 node = IdentifierNode()
524 node.StartParsing('identifier', parent) 529 node.StartParsing('identifier', parent)
525 node.HandleAttribute('name', name) 530 node.HandleAttribute('name', name)
526 node.HandleAttribute('id', id) 531 node.HandleAttribute('id', id)
527 node.HandleAttribute('comment', comment) 532 node.HandleAttribute('comment', comment)
528 node.HandleAttribute('systemid', systemid) 533 node.HandleAttribute('systemid', systemid)
529 node.EndParsing() 534 node.EndParsing()
530 return node 535 return node
OLDNEW
« no previous file with comments | « no previous file | grit/tool/build.py » ('j') | grit/tool/build.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698