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

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

Issue 10797039: Extensions Docs Server: devtools API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move parsing logic into utils 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
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
« no previous file with comments | « chrome/common/extensions/docs/js/api_page_generator.js ('k') | chrome/common/extensions/docs/server2/docs_server_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698