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

Side by Side Diff: third_party/chrome/tools/json_schema_compiler/schema_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, 10 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 """Utilies for the processing of schema python structures. 4 """Utilies for the processing of schema python structures.
5 """ 5 """
6 6
7 import json_parse 7 import json_parse
8 8
9 def CapitalizeFirstLetter(value): 9 def CapitalizeFirstLetter(value):
10 return value[0].capitalize() + value[1:] 10 return value[0].capitalize() + value[1:]
(...skipping 17 matching lines...) Expand all
28 28
29 Also strips any leading 'Experimental' prefix.""" 29 Also strips any leading 'Experimental' prefix."""
30 parts = [] 30 parts = []
31 full_name = namespace_name + "." + function_name 31 full_name = namespace_name + "." + function_name
32 for part in full_name.split("."): 32 for part in full_name.split("."):
33 parts.append(CapitalizeFirstLetter(part)) 33 parts.append(CapitalizeFirstLetter(part))
34 if parts[0] == "Experimental": 34 if parts[0] == "Experimental":
35 del parts[0] 35 del parts[0]
36 class_name = "".join(parts) 36 class_name = "".join(parts)
37 return class_name 37 return class_name
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698