| 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 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 branch_utility, | 63 branch_utility, |
| 64 host_file_system_creator) | 64 host_file_system_creator) |
| 65 | 65 |
| 66 self.api_list_data_source_factory = APIListDataSource.Factory( | 66 self.api_list_data_source_factory = APIListDataSource.Factory( |
| 67 self.compiled_host_fs_factory, | 67 self.compiled_host_fs_factory, |
| 68 svn_constants.API_PATH, | 68 svn_constants.API_PATH, |
| 69 svn_constants.PUBLIC_TEMPLATE_PATH) | 69 svn_constants.PUBLIC_TEMPLATE_PATH) |
| 70 | 70 |
| 71 self.api_data_source_factory = APIDataSource.Factory( | 71 self.api_data_source_factory = APIDataSource.Factory( |
| 72 self.compiled_host_fs_factory, | 72 self.compiled_host_fs_factory, |
| 73 svn_constants.API_PATH) | 73 svn_constants.API_PATH, |
| 74 self.availability_finder_factory) |
| 74 | 75 |
| 75 self.ref_resolver_factory = ReferenceResolver.Factory( | 76 self.ref_resolver_factory = ReferenceResolver.Factory( |
| 76 self.api_data_source_factory, | 77 self.api_data_source_factory, |
| 77 self.api_list_data_source_factory, | 78 self.api_list_data_source_factory, |
| 78 object_store_creator) | 79 object_store_creator) |
| 79 | 80 |
| 80 self.api_data_source_factory.SetReferenceResolverFactory( | 81 self.api_data_source_factory.SetReferenceResolverFactory( |
| 81 self.ref_resolver_factory) | 82 self.ref_resolver_factory) |
| 82 | 83 |
| 83 # Note: samples are super slow in the dev server because it doesn't support | 84 # Note: samples are super slow in the dev server because it doesn't support |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 object_store_creator)) | 154 object_store_creator)) |
| 154 | 155 |
| 155 @staticmethod | 156 @staticmethod |
| 156 def ForLocal(): | 157 def ForLocal(): |
| 157 channel = 'trunk' | 158 channel = 'trunk' |
| 158 object_store_creator = ObjectStoreCreator(channel, | 159 object_store_creator = ObjectStoreCreator(channel, |
| 159 start_empty=False, | 160 start_empty=False, |
| 160 store_type=TestObjectStore) | 161 store_type=TestObjectStore) |
| 161 host_file_system_creator = HostFileSystemCreator.ForLocal( | 162 host_file_system_creator = HostFileSystemCreator.ForLocal( |
| 162 object_store_creator) | 163 object_store_creator) |
| 163 trunk_file_system = host_file_system_creator.Create( | 164 trunk_file_system = host_file_system_creator.Create('trunk') |
| 164 'trunk') | |
| 165 return ServerInstance( | 165 return ServerInstance( |
| 166 channel, | 166 channel, |
| 167 object_store_creator, | 167 object_store_creator, |
| 168 trunk_file_system, | 168 trunk_file_system, |
| 169 EmptyDirFileSystem(), | 169 EmptyDirFileSystem(), |
| 170 '', | 170 '', |
| 171 CompiledFileSystem.Factory(trunk_file_system, object_store_creator), | 171 CompiledFileSystem.Factory(trunk_file_system, object_store_creator), |
| 172 TestBranchUtility.CreateWithCannedData(), | 172 TestBranchUtility.CreateWithCannedData(), |
| 173 host_file_system_creator) | 173 host_file_system_creator) |
| OLD | NEW |