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

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

Issue 14125010: Docserver: Add support for viewing docs with a codereview patch applied (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 7 years, 7 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/server_instance.py
===================================================================
--- chrome/common/extensions/docs/server2/server_instance.py (revision 199575)
+++ chrome/common/extensions/docs/server2/server_instance.py (working copy)
@@ -39,7 +39,9 @@
channel,
object_store_creator,
host_file_system,
- app_samples_file_system):
+ app_samples_file_system,
+ static_path=None,
+ compiled_fs_factory=None):
not at google - send to devlin 2013/05/11 20:39:53 having these as optional parameters doesn't gain m
self.channel = channel
self.object_store_creator = object_store_creator
@@ -48,9 +50,12 @@
self.app_samples_file_system = app_samples_file_system
- self.compiled_host_fs_factory = CompiledFileSystem.Factory(
- host_file_system,
- object_store_creator)
+ if compiled_fs_factory is None:
+ self.compiled_host_fs_factory = CompiledFileSystem.Factory(
+ host_file_system,
+ object_store_creator)
+ else:
+ self.compiled_host_fs_factory = compiled_fs_factory
self.api_list_data_source_factory = APIListDataSource.Factory(
self.compiled_host_fs_factory,
@@ -97,6 +102,8 @@
self.compiled_host_fs_factory,
svn_constants.JSON_PATH)
+ if static_path is None:
+ static_path = '/static' if channel == 'stable' else '/%s/static' % channel
self.template_data_source_factory = TemplateDataSource.Factory(
channel,
self.api_data_source_factory,
@@ -107,7 +114,8 @@
self.compiled_host_fs_factory,
self.ref_resolver_factory,
svn_constants.PUBLIC_TEMPLATE_PATH,
- svn_constants.PRIVATE_TEMPLATE_PATH)
+ svn_constants.PRIVATE_TEMPLATE_PATH,
+ static_path)
self.example_zipper = ExampleZipper(
self.compiled_host_fs_factory,

Powered by Google App Engine
This is Rietveld 408576698