OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 """Utilies and constants specific to Chromium C++ code. |
| 5 """ |
| 6 |
| 7 from datetime import datetime |
| 8 |
| 9 CHROMIUM_LICENSE = ( |
| 10 """// Copyright (c) %d The Chromium Authors. All rights reserved. |
| 11 // Use of this source code is governed by a BSD-style license that can be |
| 12 // found in the LICENSE file.""" % datetime.now().year |
| 13 ) |
| 14 GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN |
| 15 // %s |
| 16 // DO NOT EDIT. |
| 17 """ |
| 18 |
| 19 def cpp_name(s): |
| 20 """Translates a namespace name or function name into something more |
| 21 suited to C++. |
| 22 |
| 23 eg experimental.downloads -> Experimental_Downloads |
| 24 updateAll -> UpdateAll. |
| 25 """ |
| 26 return '_'.join([x[0].upper() + x[1:] for x in s.split('.')]) |
OLD | NEW |