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 229cbf4e0f1e80168e7f8cb0f4512057b689f3ca..0204d749dbcc3b5baa2fecc4142b50db98544e99 100644 |
--- a/chrome/common/extensions/docs/server2/api_list_data_source.py |
+++ b/chrome/common/extensions/docs/server2/api_list_data_source.py |
@@ -5,6 +5,7 @@ |
import os |
import third_party.json_schema_compiler.model as model |
+from docs_server_utils import SanitizeAPIName |
class APIListDataSource(object): |
""" This class creates a list of chrome.* APIs and chrome.experimental.* APIs |
@@ -17,7 +18,7 @@ class APIListDataSource(object): |
self._public_path = public_path + '/' |
def _ListAPIs(self, apis): |
- api_names = set(os.path.splitext(name)[0] for name in apis) |
+ api_names = set(SanitizeAPIName(name, self._api_path) for name in apis) |
public_templates = self._file_system.ReadSingle(self._public_path) |
template_names = [os.path.splitext(name)[0] for name in public_templates] |
experimental_apis = [] |
@@ -40,6 +41,6 @@ class APIListDataSource(object): |
def get(self, key): |
try: |
- return self._cache.GetFromFile(self._api_path)[key] |
+ return self._cache.GetFromFileListing(self._api_path)[key] |
except Exception as e: |
return None |