Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: mojo/shell/dynamic_application_loader.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698