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

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

Issue 59773005: Docserver: Fix a bug where undocumented APIs were being shown on the Private APIs page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moving the if statement. Created 7 years, 1 month 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 | chrome/common/extensions/docs/server2/app.yaml » ('j') | 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 10c4087449ba6b6ed471aea254e807f99e830661..4efe5ca81af90f7df7d0c29154ed590b916abf2f 100644
--- a/chrome/common/extensions/docs/server2/api_list_data_source.py
+++ b/chrome/common/extensions/docs/server2/api_list_data_source.py
@@ -21,8 +21,8 @@ def _GetAPICategory(api, documented_apis):
class APIListDataSource(object):
""" This class creates a list of chrome.* APIs and chrome.experimental.* APIs
- for extensions and apps that are used in the api_index.html and
- experimental.html pages.
+ for extensions and apps that are used in the api_index.html,
+ experimental.html, and private_apis.html pages.
An API is considered listable if it is listed in _api_features.json,
it has a corresponding HTML file in the public template path, and one of
@@ -75,8 +75,9 @@ class APIListDataSource(object):
def MakeDictForPlatform(platform):
platform_dict = { 'chrome': [], 'experimental': [], 'private': [] }
for api in FilterAPIs(platform):
- category = _GetAPICategory(api, documented_apis[platform])
- platform_dict[category].append(api)
+ if api['name'] in documented_apis[platform]:
+ category = _GetAPICategory(api, documented_apis[platform])
+ platform_dict[category].append(api)
for category, apis in platform_dict.iteritems():
platform_dict[category] = sorted(apis, key=itemgetter('name'))
utils.MarkLast(platform_dict[category])
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698