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

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

Issue 10689144: Extensions Docs Server: Samples zip files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up and 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 a19cf167cb96829daa555017a1070a022f07a12e..984f82af2992a47691cc61da10ecaf630cb6dc4b 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -15,6 +15,7 @@ class TemplateDataSource(object):
branch,
api_data_source,
intro_data_source,
+ samples_data_source,
cache_builder,
base_paths):
self._branch_info = self._MakeBranchDict(branch)
@@ -22,6 +23,7 @@ class TemplateDataSource(object):
'/static')
self._api_data_source = api_data_source
self._intro_data_source = intro_data_source
+ self._samples_data_source = samples_data_source
self._cache = cache_builder.build(self._LoadTemplate)
self._base_paths = base_paths
@@ -54,6 +56,7 @@ class TemplateDataSource(object):
'branchInfo': self._branch_info,
'intros': self._intro_data_source,
'partials': self,
+ 'samples': self._samples_data_source,
'static': self._static_resources
}).text
@@ -64,7 +67,7 @@ class TemplateDataSource(object):
real_path = FormatKey(key)
for base_path in self._base_paths:
try:
- return self._cache.get(base_path + '/' + real_path)
+ return self._cache.getFromFile(base_path + '/' + real_path)
except:
pass
return None

Powered by Google App Engine
This is Rietveld 408576698