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 | 5 from fnmatch import fnmatch |
| 6 import mimetypes | 6 import mimetypes |
| 7 import traceback | 7 import traceback |
| 8 import os | 8 import os |
| 9 | 9 |
| 10 from api_data_source import APIDataSource | 10 from api_data_source import APIDataSource |
| 11 from api_list_data_source import APIListDataSource | 11 from api_list_data_source import APIListDataSource |
| 12 from appengine_url_fetcher import AppEngineUrlFetcher | 12 from appengine_url_fetcher import AppEngineUrlFetcher |
| 13 from appengine_wrappers import GetAppVersion, IsDevServer | 13 from appengine_wrappers import GetAppVersion, IsDevServer |
| 14 from availability_finder import AvailabilityFinder | 14 from availability_finder import AvailabilityFinder |
| 15 from branch_utility import BranchUtility | 15 from branch_utility import BranchUtility |
| 16 from caching_file_system import CachingFileSystem | 16 from caching_file_system import CachingFileSystem |
| 17 from compiled_file_system import CompiledFileSystem | 17 from compiled_file_system import CompiledFileSystem |
| 18 from empty_dir_file_system import EmptyDirFileSystem | 18 from empty_dir_file_system import EmptyDirFileSystem |
| 19 from example_zipper import ExampleZipper | 19 from example_zipper import ExampleZipper |
| 20 from manifest_data_source import ManifestDataSource | |
| 20 from file_system import FileNotFoundError | 21 from file_system import FileNotFoundError |
| 21 from github_file_system import GithubFileSystem | 22 from github_file_system import GithubFileSystem |
| 22 from host_file_system_creator import HostFileSystemCreator | 23 from host_file_system_creator import HostFileSystemCreator |
| 23 from intro_data_source import IntroDataSource | 24 from intro_data_source import IntroDataSource |
| 24 from object_store_creator import ObjectStoreCreator | 25 from object_store_creator import ObjectStoreCreator |
| 25 from offline_file_system import OfflineFileSystem | |
| 26 from path_canonicalizer import PathCanonicalizer | 26 from path_canonicalizer import PathCanonicalizer |
| 27 from redirector import Redirector | 27 from redirector import Redirector |
| 28 from reference_resolver import ReferenceResolver | 28 from reference_resolver import ReferenceResolver |
| 29 from samples_data_source import SamplesDataSource | 29 from samples_data_source import SamplesDataSource |
| 30 from sidenav_data_source import SidenavDataSource | 30 from sidenav_data_source import SidenavDataSource |
| 31 import svn_constants | 31 import svn_constants |
| 32 from template_data_source import TemplateDataSource | 32 from template_data_source import TemplateDataSource |
| 33 from test_branch_utility import TestBranchUtility | 33 from test_branch_utility import TestBranchUtility |
| 34 from test_object_store import TestObjectStore | 34 from test_object_store import TestObjectStore |
| 35 from third_party.json_schema_compiler.model import UnixName | |
| 36 import url_constants | |
| 37 | 35 |
| 38 class ServerInstance(object): | 36 class ServerInstance(object): |
| 39 def __init__(self, | 37 def __init__(self, |
| 40 object_store_creator, | 38 object_store_creator, |
| 41 host_file_system, | 39 host_file_system, |
| 42 app_samples_file_system, | 40 app_samples_file_system, |
| 43 base_path, | 41 base_path, |
| 44 compiled_fs_factory, | 42 compiled_fs_factory, |
| 45 branch_utility, | 43 branch_utility, |
| 46 host_file_system_creator): | 44 host_file_system_creator): |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 | 97 |
| 100 self.intro_data_source_factory = IntroDataSource.Factory( | 98 self.intro_data_source_factory = IntroDataSource.Factory( |
| 101 self.compiled_host_fs_factory, | 99 self.compiled_host_fs_factory, |
| 102 self.ref_resolver_factory, | 100 self.ref_resolver_factory, |
| 103 [svn_constants.INTRO_PATH, svn_constants.ARTICLE_PATH]) | 101 [svn_constants.INTRO_PATH, svn_constants.ARTICLE_PATH]) |
| 104 | 102 |
| 105 self.sidenav_data_source_factory = SidenavDataSource.Factory( | 103 self.sidenav_data_source_factory = SidenavDataSource.Factory( |
| 106 self.compiled_host_fs_factory, | 104 self.compiled_host_fs_factory, |
| 107 svn_constants.JSON_PATH) | 105 svn_constants.JSON_PATH) |
| 108 | 106 |
| 107 self.manifest_data_source = ManifestDataSource( | |
| 108 self.compiled_host_fs_factory, | |
| 109 host_file_system, | |
| 110 '/'.join((svn_constants.JSON_PATH, 'manifest.json')), | |
| 111 '/'.join((svn_constants.API_PATH, '_manifest_features.json'))) | |
| 112 | |
| 109 self.template_data_source_factory = TemplateDataSource.Factory( | 113 self.template_data_source_factory = TemplateDataSource.Factory( |
| 110 self.api_data_source_factory, | 114 self.api_data_source_factory, |
| 115 | |
|
not at google - send to devlin
2013/07/20 02:49:03
where did this empty line come from?
jshumway
2013/07/22 17:16:27
I think something strange happened in the conflict
| |
| 111 self.api_list_data_source_factory, | 116 self.api_list_data_source_factory, |
| 112 self.intro_data_source_factory, | 117 self.intro_data_source_factory, |
| 113 self.samples_data_source_factory, | 118 self.samples_data_source_factory, |
| 114 self.sidenav_data_source_factory, | 119 self.sidenav_data_source_factory, |
| 115 self.compiled_host_fs_factory, | 120 self.compiled_host_fs_factory, |
| 116 self.ref_resolver_factory, | 121 self.ref_resolver_factory, |
| 122 self.manifest_data_source, | |
| 117 svn_constants.PUBLIC_TEMPLATE_PATH, | 123 svn_constants.PUBLIC_TEMPLATE_PATH, |
| 118 svn_constants.PRIVATE_TEMPLATE_PATH, | 124 svn_constants.PRIVATE_TEMPLATE_PATH, |
| 119 base_path) | 125 base_path) |
| 120 | 126 |
| 121 self.api_data_source_factory.SetTemplateDataSource( | 127 self.api_data_source_factory.SetTemplateDataSource( |
| 122 self.template_data_source_factory) | 128 self.template_data_source_factory) |
| 123 | 129 |
| 124 self.example_zipper = ExampleZipper( | 130 self.example_zipper = ExampleZipper( |
| 125 self.compiled_host_fs_factory, | 131 self.compiled_host_fs_factory, |
| 126 svn_constants.DOCS_PATH) | 132 svn_constants.DOCS_PATH) |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 157 object_store_creator) | 163 object_store_creator) |
| 158 trunk_file_system = host_file_system_creator.Create() | 164 trunk_file_system = host_file_system_creator.Create() |
| 159 return ServerInstance( | 165 return ServerInstance( |
| 160 object_store_creator, | 166 object_store_creator, |
| 161 trunk_file_system, | 167 trunk_file_system, |
| 162 EmptyDirFileSystem(), | 168 EmptyDirFileSystem(), |
| 163 '', | 169 '', |
| 164 CompiledFileSystem.Factory(trunk_file_system, object_store_creator), | 170 CompiledFileSystem.Factory(trunk_file_system, object_store_creator), |
| 165 TestBranchUtility.CreateWithCannedData(), | 171 TestBranchUtility.CreateWithCannedData(), |
| 166 host_file_system_creator) | 172 host_file_system_creator) |
| OLD | NEW |