| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Utilies and constants specific to Chromium C++ code. | 5 """Utilies and constants specific to Chromium C++ code. |
| 6 """ | 6 """ |
| 7 | 7 |
| 8 from datetime import datetime | 8 from datetime import datetime |
| 9 from model import Property, PropertyType, Type | 9 from model import Property, PropertyType, Type |
| 10 import os | 10 import os |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 e.g chrome/extensions/gen, file.h becomes CHROME_EXTENSIONS_GEN_FILE_H__. | 84 e.g chrome/extensions/gen, file.h becomes CHROME_EXTENSIONS_GEN_FILE_H__. |
| 85 """ | 85 """ |
| 86 return (('%s_%s_H__' % (path, filename)) | 86 return (('%s_%s_H__' % (path, filename)) |
| 87 .upper().replace(os.sep, '_').replace('/', '_')) | 87 .upper().replace(os.sep, '_').replace('/', '_')) |
| 88 | 88 |
| 89 def PadForGenerics(var): | 89 def PadForGenerics(var): |
| 90 """Appends a space to |var| if it ends with a >, so that it can be compiled | 90 """Appends a space to |var| if it ends with a >, so that it can be compiled |
| 91 within generic types. | 91 within generic types. |
| 92 """ | 92 """ |
| 93 return ('%s ' % var) if var.endswith('>') else var | 93 return ('%s ' % var) if var.endswith('>') else var |
| OLD | NEW |