Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from fnmatch import fnmatch | |
| 6 import logging | |
| 7 import mimetypes | |
| 8 import traceback | |
| 9 import os | |
| 10 | |
| 11 from api_data_source import APIDataSource | 5 from api_data_source import APIDataSource |
| 12 from api_list_data_source import APIListDataSource | 6 from api_list_data_source import APIListDataSource |
| 13 from appengine_url_fetcher import AppEngineUrlFetcher | 7 from appengine_wrappers import IsDevServer |
| 14 from appengine_wrappers import GetAppVersion, IsDevServer | |
| 15 from branch_utility import BranchUtility | |
| 16 from caching_file_system import CachingFileSystem | 8 from caching_file_system import CachingFileSystem |
| 17 from compiled_file_system import CompiledFileSystem | 9 from compiled_file_system import CompiledFileSystem |
| 18 from empty_dir_file_system import EmptyDirFileSystem | 10 from empty_dir_file_system import EmptyDirFileSystem |
| 19 from example_zipper import ExampleZipper | 11 from example_zipper import ExampleZipper |
| 20 from file_system import FileNotFoundError | |
| 21 from github_file_system import GithubFileSystem | |
| 22 from intro_data_source import IntroDataSource | 12 from intro_data_source import IntroDataSource |
| 23 from local_file_system import LocalFileSystem | 13 from local_file_system import LocalFileSystem |
| 14 from manifest_data_source import ManifestDataSource | |
| 24 from object_store_creator import ObjectStoreCreator | 15 from object_store_creator import ObjectStoreCreator |
| 25 from offline_file_system import OfflineFileSystem | |
| 26 from path_canonicalizer import PathCanonicalizer | 16 from path_canonicalizer import PathCanonicalizer |
| 27 from reference_resolver import ReferenceResolver | 17 from reference_resolver import ReferenceResolver |
| 28 from samples_data_source import SamplesDataSource | 18 from samples_data_source import SamplesDataSource |
| 29 from sidenav_data_source import SidenavDataSource | 19 from sidenav_data_source import SidenavDataSource |
| 30 from subversion_file_system import SubversionFileSystem | |
| 31 import svn_constants | 20 import svn_constants |
| 32 from template_data_source import TemplateDataSource | 21 from template_data_source import TemplateDataSource |
| 33 from test_object_store import TestObjectStore | 22 from test_object_store import TestObjectStore |
| 34 from third_party.json_schema_compiler.model import UnixName | |
| 35 import url_constants | |
| 36 | 23 |
| 37 class ServerInstance(object): | 24 class ServerInstance(object): |
| 38 def __init__(self, | 25 def __init__(self, |
| 39 channel, | 26 channel, |
| 40 object_store_creator, | 27 object_store_creator, |
| 41 host_file_system, | 28 host_file_system, |
| 42 app_samples_file_system): | 29 app_samples_file_system): |
| 43 self.channel = channel | 30 self.channel = channel |
| 44 | 31 |
| 45 self.object_store_creator = object_store_creator | 32 self.object_store_creator = object_store_creator |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 | 77 |
| 91 self.intro_data_source_factory = IntroDataSource.Factory( | 78 self.intro_data_source_factory = IntroDataSource.Factory( |
| 92 self.compiled_host_fs_factory, | 79 self.compiled_host_fs_factory, |
| 93 self.ref_resolver_factory, | 80 self.ref_resolver_factory, |
| 94 [svn_constants.INTRO_PATH, svn_constants.ARTICLE_PATH]) | 81 [svn_constants.INTRO_PATH, svn_constants.ARTICLE_PATH]) |
| 95 | 82 |
| 96 self.sidenav_data_source_factory = SidenavDataSource.Factory( | 83 self.sidenav_data_source_factory = SidenavDataSource.Factory( |
| 97 self.compiled_host_fs_factory, | 84 self.compiled_host_fs_factory, |
| 98 svn_constants.JSON_PATH) | 85 svn_constants.JSON_PATH) |
| 99 | 86 |
| 87 self.manifest_data_source = ManifestDataSource( | |
| 88 self.compiled_host_fs_factory, | |
| 89 LocalFileSystem.Create(), | |
|
not at google - send to devlin
2013/05/12 04:20:05
sorry for not picking this up, but this should be
| |
| 90 '/'.join((svn_constants.JSON_PATH, 'manifest.json')), | |
| 91 '/'.join((svn_constants.API_PATH, '_manifest_features.json'))) | |
| 92 | |
| 100 self.template_data_source_factory = TemplateDataSource.Factory( | 93 self.template_data_source_factory = TemplateDataSource.Factory( |
| 101 channel, | 94 channel, |
| 102 self.api_data_source_factory, | 95 self.api_data_source_factory, |
| 103 self.api_list_data_source_factory, | 96 self.api_list_data_source_factory, |
| 104 self.intro_data_source_factory, | 97 self.intro_data_source_factory, |
| 105 self.samples_data_source_factory, | 98 self.samples_data_source_factory, |
| 106 self.sidenav_data_source_factory, | 99 self.sidenav_data_source_factory, |
| 107 self.compiled_host_fs_factory, | 100 self.compiled_host_fs_factory, |
| 108 self.ref_resolver_factory, | 101 self.ref_resolver_factory, |
| 102 self.manifest_data_source, | |
| 109 svn_constants.PUBLIC_TEMPLATE_PATH, | 103 svn_constants.PUBLIC_TEMPLATE_PATH, |
| 110 svn_constants.PRIVATE_TEMPLATE_PATH) | 104 svn_constants.PRIVATE_TEMPLATE_PATH) |
| 111 | 105 |
| 112 self.example_zipper = ExampleZipper( | 106 self.example_zipper = ExampleZipper( |
| 113 self.compiled_host_fs_factory, | 107 self.compiled_host_fs_factory, |
| 114 svn_constants.DOCS_PATH) | 108 svn_constants.DOCS_PATH) |
| 115 | 109 |
| 116 self.path_canonicalizer = PathCanonicalizer( | 110 self.path_canonicalizer = PathCanonicalizer( |
| 117 channel, | 111 channel, |
| 118 self.compiled_host_fs_factory) | 112 self.compiled_host_fs_factory) |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 131 def ForLocal(): | 125 def ForLocal(): |
| 132 channel = 'trunk' | 126 channel = 'trunk' |
| 133 object_store_creator = ObjectStoreCreator(channel, | 127 object_store_creator = ObjectStoreCreator(channel, |
| 134 start_empty=False, | 128 start_empty=False, |
| 135 store_type=TestObjectStore) | 129 store_type=TestObjectStore) |
| 136 return ServerInstance( | 130 return ServerInstance( |
| 137 channel, | 131 channel, |
| 138 object_store_creator, | 132 object_store_creator, |
| 139 CachingFileSystem(LocalFileSystem.Create(), object_store_creator), | 133 CachingFileSystem(LocalFileSystem.Create(), object_store_creator), |
| 140 EmptyDirFileSystem()) | 134 EmptyDirFileSystem()) |
| OLD | NEW |