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

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

Issue 10834144: Extensions Docs Server: Split apps from extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 65039a48b5398aa785526e8aac3931eb0314fd64..91b28c18653476bd499a04c1da0d4e37dba95816 100644
--- a/chrome/common/extensions/docs/server2/template_data_source.py
+++ b/chrome/common/extensions/docs/server2/template_data_source.py
@@ -9,8 +9,9 @@ from third_party.handlebar import Handlebar
EXTENSIONS_URL = '/chrome/extensions'
-def _MakeBranchDict(branch):
+def _MakeBranchDict(branch, doc_type):
return {
+ 'is_apps': doc_type == 'apps',
'showWarning': branch != 'stable',
'branches': [
{ 'name': 'Stable', 'path': 'stable' },
@@ -39,6 +40,7 @@ class TemplateDataSource(object):
"""
def __init__(self,
branch,
+ doc_type,
api_data_source_factory,
api_list_data_source,
intro_data_source,
@@ -46,7 +48,7 @@ class TemplateDataSource(object):
cache_builder,
public_template_path,
private_template_path):
- self._branch_info = _MakeBranchDict(branch)
+ self._branch_info = _MakeBranchDict(branch, doc_type)
self._static_resources = ((('/' + branch) if branch != 'local' else '') +
'/static')
self._api_data_source_factory = api_data_source_factory

Powered by Google App Engine
This is Rietveld 408576698