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

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

Issue 10829348: Extensions Docs Server: Large performance increase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 306034b2f25bdfb980f3fc08662f6c26629c488a..e675de97b8d743989cf7e58e9fd544eb6ea566eb 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -6,6 +6,7 @@ import logging
from docs_server_utils import FormatKey
from file_system import FileNotFoundError
+import file_system_cache as fs_cache
from third_party.handlebar import Handlebar
EXTENSIONS_URL = '/chrome/extensions'
@@ -41,18 +42,18 @@ class TemplateDataSource(object):
def __init__(self,
channel_name,
api_data_source_factory,
- api_list_data_source,
- intro_data_source,
+ api_list_data_source_factory,
+ intro_data_source_factory,
samples_data_source_factory,
cache_builder,
public_template_path,
private_template_path):
self._branch_info = _MakeChannelDict(channel_name)
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._api_list_data_source_factory = api_list_data_source_factory
+ self._intro_data_source_factory = intro_data_source_factory
self._samples_data_source_factory = samples_data_source_factory
- self._cache = cache_builder.build(Handlebar)
+ self._cache = cache_builder.build(Handlebar, fs_cache.HANDLEBAR)
self._public_template_path = public_template_path
self._private_template_path = private_template_path
self._static_resources = (
@@ -64,8 +65,8 @@ class TemplateDataSource(object):
return TemplateDataSource(
self._branch_info,
self._api_data_source_factory.Create(request),
- self._api_list_data_source,
- self._intro_data_source,
+ self._api_list_data_source_factory.Create(),
+ self._intro_data_source_factory.Create(),
self._samples_data_source_factory.Create(request),
self._cache,
self._public_template_path,

Powered by Google App Engine
This is Rietveld 408576698