OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "mojo/shell/dynamic_application_loader.h" | 5 #include "mojo/shell/dynamic_application_loader.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 loaders_.push_back(new LocalLoader(resolved_url, | 215 loaders_.push_back(new LocalLoader(resolved_url, |
216 context_, | 216 context_, |
217 runner_factory_.get(), | 217 runner_factory_.get(), |
218 load_callbacks, | 218 load_callbacks, |
219 loader_complete_callback_)); | 219 loader_complete_callback_)); |
220 return; | 220 return; |
221 } | 221 } |
222 | 222 |
223 if (!network_service_) { | 223 if (!network_service_) { |
224 context_->application_manager()->ConnectToService( | 224 context_->application_manager()->ConnectToService( |
225 GURL("mojo:mojo_network_service"), &network_service_); | 225 GURL("mojo:network_service"), &network_service_); |
226 } | 226 } |
227 | 227 |
228 loaders_.push_back(new NetworkLoader(resolved_url, | 228 loaders_.push_back(new NetworkLoader(resolved_url, |
229 &mime_type_to_url_, | 229 &mime_type_to_url_, |
230 context_, | 230 context_, |
231 runner_factory_.get(), | 231 runner_factory_.get(), |
232 network_service_.get(), | 232 network_service_.get(), |
233 load_callbacks, | 233 load_callbacks, |
234 loader_complete_callback_)); | 234 loader_complete_callback_)); |
235 } | 235 } |
236 | 236 |
237 void DynamicApplicationLoader::OnApplicationError(ApplicationManager* manager, | 237 void DynamicApplicationLoader::OnApplicationError(ApplicationManager* manager, |
238 const GURL& url) { | 238 const GURL& url) { |
239 // TODO(darin): What should we do about service errors? This implies that | 239 // TODO(darin): What should we do about service errors? This implies that |
240 // the app closed its handle to the service manager. Maybe we don't care? | 240 // the app closed its handle to the service manager. Maybe we don't care? |
241 } | 241 } |
242 | 242 |
243 void DynamicApplicationLoader::LoaderComplete(Loader* loader) { | 243 void DynamicApplicationLoader::LoaderComplete(Loader* loader) { |
244 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader)); | 244 loaders_.erase(std::find(loaders_.begin(), loaders_.end(), loader)); |
245 } | 245 } |
246 | 246 |
247 } // namespace shell | 247 } // namespace shell |
248 } // namespace mojo | 248 } // namespace mojo |
OLD | NEW |