Chromium Code Reviews| 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, |