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

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

Issue 38923003: Docserver: Fix missing samples in some API reference pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 | « chrome/common/extensions/docs/server2/cron.yaml ('k') | 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/samples_data_source.py
diff --git a/chrome/common/extensions/docs/server2/samples_data_source.py b/chrome/common/extensions/docs/server2/samples_data_source.py
index 449914bc2d3d1c73601d9c5d58fe146168a11b02..5045172c014913e9d9ceae0d5a803ef41a8fd7a0 100644
--- a/chrome/common/extensions/docs/server2/samples_data_source.py
+++ b/chrome/common/extensions/docs/server2/samples_data_source.py
@@ -191,12 +191,11 @@ class SamplesDataSource(object):
only the samples that use the API |api_name|. |key| is either 'apps' or
'extensions'.
'''
- api_search = api_name.replace('.', '_') + '_'
+ api_search = api_name + '.'
samples_list = []
try:
for sample in self.get(key):
- api_calls_unix = [model.UnixName(call['name'])
- for call in sample['api_calls']]
+ api_calls_unix = [call['name'] for call in sample['api_calls']]
for call in api_calls_unix:
if call.startswith(api_search):
samples_list.append(sample)
« no previous file with comments | « chrome/common/extensions/docs/server2/cron.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698