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

Side by Side Diff: third_party/chrome/tools/json_schema_compiler/cpp_util.py

Issue 12300042: Update idlsync.py to pull in dependencies required for chrome api generation. (Closed) Base URL: git://github.com/dart-lang/bleeding_edge.git@master
Patch Set: From another checkout Created 7 years, 9 months 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698