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

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: everything but patch_servlet 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,
+ compiled_fs_factory):
self.channel = channel
self.object_store_creator = object_store_creator
@@ -48,9 +50,7 @@
self.app_samples_file_system = app_samples_file_system
- self.compiled_host_fs_factory = CompiledFileSystem.Factory(
- host_file_system,
- object_store_creator)
+ self.compiled_host_fs_factory = compiled_fs_factory
self.api_list_data_source_factory = APIListDataSource.Factory(
self.compiled_host_fs_factory,
@@ -107,7 +107,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,
@@ -122,10 +123,14 @@
@staticmethod
def ForTest(file_system):
+ object_store_creator = ObjectStoreCreator.ForTest()
return ServerInstance('test',
- ObjectStoreCreator.ForTest(),
+ object_store_creator,
file_system,
- EmptyDirFileSystem())
+ EmptyDirFileSystem(),
+ '/static',
+ CompiledFileSystem.Factory(file_system,
+ object_store_creator))
@staticmethod
def ForLocal():
@@ -133,8 +138,12 @@
object_store_creator = ObjectStoreCreator(channel,
start_empty=False,
store_type=TestObjectStore)
+ file_system = CachingFileSystem(LocalFileSystem.Create(),
+ object_store_creator)
return ServerInstance(
channel,
object_store_creator,
- CachingFileSystem(LocalFileSystem.Create(), object_store_creator),
- EmptyDirFileSystem())
+ file_system,
+ EmptyDirFileSystem(),
+ '/static',
+ CompiledFileSystem.Factory(file_system, object_store_creator))

Powered by Google App Engine
This is Rietveld 408576698