| Index: tools/json_schema_compiler/cpp_util.py
|
| diff --git a/tools/json_schema_compiler/cpp_util.py b/tools/json_schema_compiler/cpp_util.py
|
| index 3b65f5d55fb6b1b1cf47ffad06032d980d102582..253b6c97c25c39fd41a06641d1c44e9f9705eaca 100644
|
| --- a/tools/json_schema_compiler/cpp_util.py
|
| +++ b/tools/json_schema_compiler/cpp_util.py
|
| @@ -6,6 +6,7 @@
|
|
|
| from datetime import datetime
|
| from model import PropertyType
|
| +import os
|
|
|
| CHROMIUM_LICENSE = (
|
| """// Copyright (c) %d The Chromium Authors. All rights reserved.
|
| @@ -16,6 +17,10 @@ GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN
|
| // %s
|
| // DO NOT EDIT.
|
| """
|
| +GENERATED_BUNDLE_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITIONS IN
|
| +// %s
|
| +// DO NOT EDIT.
|
| +"""
|
|
|
| def Classname(s):
|
| """Translates a namespace name or function name into something more
|
| @@ -67,3 +72,11 @@ def GetParameterDeclaration(param, type_):
|
| 'type': type_,
|
| 'name': param.unix_name,
|
| }
|
| +
|
| +def GenerateIfndefName(path, filename):
|
| + """Formats a path and filename as a #define name.
|
| +
|
| + e.g chrome/extensions/gen, file.h becomes CHROME_EXTENSIONS_GEN_FILE_H__.
|
| + """
|
| + return (('%s_%s_H__' % (path, filename))
|
| + .upper().replace(os.sep, '_'))
|
|
|