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

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

Issue 10835012: Extension Docs Server: Include a list of samples used in the api reference page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the tests 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/template_data_source.py
diff --git a/chrome/common/extensions/docs/server2/template_data_source.py b/chrome/common/extensions/docs/server2/template_data_source.py
index e2f03d9547078c354ac72feb94bc4c34a1261038..c614dbdafe24f55d88ee6cde0da46e65dae12496 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -39,7 +39,7 @@ class TemplateDataSource(object):
"""
def __init__(self,
branch,
- api_data_source,
+ api_data_source_factory,
api_list_data_source,
intro_data_source,
samples_data_source_factory,
@@ -49,7 +49,7 @@ class TemplateDataSource(object):
self._branch_info = _MakeBranchDict(branch)
self._static_resources = ((('/' + branch) if branch != 'local' else '') +
'/static')
- self._api_data_source = api_data_source
+ self._api_data_source_factory = api_data_source_factory
self._api_list_data_source = api_list_data_source
self._intro_data_source = intro_data_source
self._samples_data_source_factory = samples_data_source_factory
@@ -62,7 +62,7 @@ class TemplateDataSource(object):
"""
return TemplateDataSource(self._branch_info,
self._static_resources,
- self._api_data_source,
+ self._api_data_source_factory,
self._api_list_data_source,
self._intro_data_source,
self._samples_data_source_factory,
@@ -74,7 +74,7 @@ class TemplateDataSource(object):
def __init__(self,
branch_info,
static_resources,
- api_data_source,
+ api_data_source_factory,
api_list_data_source,
intro_data_source,
samples_data_source_factory,
@@ -84,10 +84,11 @@ class TemplateDataSource(object):
request):
self._branch_info = branch_info
self._static_resources = static_resources
- self._api_data_source = api_data_source
self._api_list_data_source = api_list_data_source
self._intro_data_source = intro_data_source
self._samples_data_source = samples_data_source_factory.Create(request)
+ self._api_data_source = api_data_source_factory.Create(
+ self._samples_data_source.get(''))
not at google - send to devlin 2012/07/30 12:26:22 This looks kind of strange. Could you add a GetAll
chebert 2012/07/31 22:41:33 Done.
self._cache = cache
self._public_template_path = public_template_path
self._private_template_path = private_template_path

Powered by Google App Engine
This is Rietveld 408576698