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

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

Issue 14273041: Doc server manifest page generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manifest Update preview 2 Created 7 years, 8 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 eae53303e5d01c0d561df7757db575e5d2c81bee..57ff81013d96da0122bcc8b2071e5414bfa6f213 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import json
import logging
import os
import traceback
@@ -10,6 +11,8 @@ from branch_utility import BranchUtility
import compiled_file_system as compiled_fs
from docs_server_utils import FormatKey
from file_system import FileNotFoundError
+from manifest_data_source import ManifestDataSource
+from svn_constants import JSON_PATH
from third_party.handlebar import Handlebar
import url_constants
@@ -64,6 +67,8 @@ class TemplateDataSource(object):
self._public_template_path = public_template_path
self._private_template_path = private_template_path
self._static_resources = '/%s/static' % channel_name
+ self._manifest_source = ManifestDataSource(
+ compiled_fs_factory, TemplateDataSource)
not at google - send to devlin 2013/05/03 15:56:25 pass this in from ServerInstance like the other de
def _CreateTemplate(self, template_name, text):
return Handlebar(self._ref_resolver.ResolveAllLinks(text))
@@ -78,6 +83,7 @@ class TemplateDataSource(object):
self._intro_data_source_factory.Create(),
self._samples_data_source_factory.Create(request),
self._sidenav_data_source_factory.Create(path),
+ self._manifest_source,
self._cache,
self._public_template_path,
self._private_template_path,
@@ -90,6 +96,7 @@ class TemplateDataSource(object):
intro_data_source,
samples_data_source,
sidenav_data_source,
+ manifest_source,
cache,
public_template_path,
private_template_path,
@@ -104,6 +111,7 @@ class TemplateDataSource(object):
self._public_template_path = public_template_path
self._private_template_path = private_template_path
self._static_resources = static_resources
+ self._manifest_source = manifest_source
def Render(self, template_name):
"""This method will render a template named |template_name|, fetching all
@@ -121,6 +129,7 @@ class TemplateDataSource(object):
'intros': self._intro_data_source,
'sidenavs': self._sidenav_data_source,
'partials': self,
+ 'manifest_source': self._manifest_source,
'samples': self._samples_data_source,
'static': self._static_resources,
'app': 'app',

Powered by Google App Engine
This is Rietveld 408576698