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

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

Issue 323593002: Mojo: Use network service to load non-local Mojo Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.cc ('k') | mojo/shell/shell_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/run.h" 5 #include "mojo/shell/run.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/service_manager/service_manager.h" 8 #include "mojo/service_manager/service_manager.h"
9 #include "mojo/shell/context.h" 9 #include "mojo/shell/context.h"
10 #include "mojo/shell/keep_alive.h" 10 #include "mojo/shell/keep_alive.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace shell { 13 namespace shell {
14 14
15 void Run(Context* context, const std::vector<GURL>& app_urls) { 15 void Run(Context* context, const std::vector<GURL>& app_urls) {
16 KeepAlive keep_alive(context); 16 KeepAlive keep_alive(context);
17 17
18 if (app_urls.empty()) { 18 if (app_urls.empty()) {
19 LOG(ERROR) << "No app path specified"; 19 LOG(ERROR) << "No app path specified";
20 return; 20 return;
21 } 21 }
22 22
23 for (std::vector<GURL>::const_iterator it = app_urls.begin(); 23 for (std::vector<GURL>::const_iterator it = app_urls.begin();
24 it != app_urls.end(); 24 it != app_urls.end();
25 ++it) { 25 ++it) {
26 if (it->scheme() == "mojo" && context->mojo_origin().empty()) {
27 LOG(ERROR) << "mojo: URL passed with no origin specified";
28 return;
29 }
30 ScopedMessagePipeHandle no_handle; 26 ScopedMessagePipeHandle no_handle;
31 context->service_manager()->ConnectToService( 27 context->service_manager()->ConnectToService(
32 *it, std::string(), no_handle.Pass(), GURL()); 28 *it, std::string(), no_handle.Pass(), GURL());
33 } 29 }
34 } 30 }
35 31
36 } // namespace shell 32 } // namespace shell
37 } // namespace mojo 33 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/out_of_process_dynamic_service_runner.cc ('k') | mojo/shell/shell_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698