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 api_categorizer import APICategorizer | 5 from api_categorizer import APICategorizer |
6 from api_data_source import APIDataSource | 6 from api_data_source import APIDataSource |
7 from api_list_data_source import APIListDataSource | 7 from api_list_data_source import APIListDataSource |
8 from api_models import APIModels | 8 from api_models import APIModels |
9 from availability_finder import AvailabilityFinder | 9 from availability_finder import AvailabilityFinder |
10 from compiled_file_system import CompiledFileSystem | 10 from compiled_file_system import CompiledFileSystem |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 self.availability_finder, | 99 self.availability_finder, |
100 self.api_models, | 100 self.api_models, |
101 self.features_bundle, | 101 self.features_bundle, |
102 self.object_store_creator) | 102 self.object_store_creator) |
103 | 103 |
104 self.ref_resolver_factory = ReferenceResolver.Factory( | 104 self.ref_resolver_factory = ReferenceResolver.Factory( |
105 self.api_data_source_factory, | 105 self.api_data_source_factory, |
106 self.api_models, | 106 self.api_models, |
107 object_store_creator) | 107 object_store_creator) |
108 | 108 |
109 self.api_data_source_factory.SetReferenceResolverFactory( | |
110 self.ref_resolver_factory) | |
111 | |
112 # Note: samples are super slow in the dev server because it doesn't support | 109 # Note: samples are super slow in the dev server because it doesn't support |
113 # async fetch, so disable them. | 110 # async fetch, so disable them. |
114 if IsDevServer(): | 111 if IsDevServer(): |
115 extension_samples_fs = EmptyDirFileSystem() | 112 extension_samples_fs = EmptyDirFileSystem() |
116 app_samples_fs = EmptyDirFileSystem() | 113 app_samples_fs = EmptyDirFileSystem() |
117 else: | 114 else: |
118 extension_samples_fs = host_fs_at_trunk | 115 extension_samples_fs = host_fs_at_trunk |
119 # TODO(kalman): Re-enable the apps samples, see http://crbug.com/344097. | 116 # TODO(kalman): Re-enable the apps samples, see http://crbug.com/344097. |
120 app_samples_fs = EmptyDirFileSystem() | 117 app_samples_fs = EmptyDirFileSystem() |
121 #app_samples_fs = github_file_system_provider.Create( | 118 #app_samples_fs = github_file_system_provider.Create( |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 store_type=TestObjectStore) | 175 store_type=TestObjectStore) |
179 host_file_system_provider = HostFileSystemProvider.ForLocal( | 176 host_file_system_provider = HostFileSystemProvider.ForLocal( |
180 object_store_creator) | 177 object_store_creator) |
181 return ServerInstance( | 178 return ServerInstance( |
182 object_store_creator, | 179 object_store_creator, |
183 CompiledFileSystem.Factory(object_store_creator), | 180 CompiledFileSystem.Factory(object_store_creator), |
184 TestBranchUtility.CreateWithCannedData(), | 181 TestBranchUtility.CreateWithCannedData(), |
185 host_file_system_provider, | 182 host_file_system_provider, |
186 GithubFileSystemProvider.ForEmpty(), | 183 GithubFileSystemProvider.ForEmpty(), |
187 CloudStorageFileSystemProvider(object_store_creator)) | 184 CloudStorageFileSystemProvider(object_store_creator)) |
OLD | NEW |