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

Unified Diff: chrome/common/extensions/docs/server2/api_list_data_source.py

Issue 10838002: Extensions Docs Server: Sort API list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better sorting Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/api_list_data_source.py
diff --git a/chrome/common/extensions/docs/server2/api_list_data_source.py b/chrome/common/extensions/docs/server2/api_list_data_source.py
index 63d8aa3a3c819cf43c6977522b3e7c035611e85d..229cbf4e0f1e80168e7f8cb0f4512057b689f3ca 100644
--- a/chrome/common/extensions/docs/server2/api_list_data_source.py
+++ b/chrome/common/extensions/docs/server2/api_list_data_source.py
@@ -22,7 +22,7 @@ class APIListDataSource(object):
template_names = [os.path.splitext(name)[0] for name in public_templates]
experimental_apis = []
chrome_apis = []
- for i, template_name in enumerate(template_names):
+ for i, template_name in enumerate(sorted(template_names)):
if model.UnixName(template_name) in api_names:
if template_name.startswith('experimental'):
experimental_apis.append({ 'name': template_name.replace('_', '.') })
@@ -31,8 +31,8 @@ class APIListDataSource(object):
chrome_apis[-1]['last'] = True
experimental_apis[-1]['last'] = True
return {
- 'chrome': sorted(chrome_apis),
- 'experimental': sorted(experimental_apis)
+ 'chrome': chrome_apis,
+ 'experimental': experimental_apis
}
def __getitem__(self, key):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698