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

Side by Side Diff: mojo/shell/shell_test_base.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/run.cc ('k') | mojo/shell/storage.h » ('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 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/shell_test_base.h" 5 #include "mojo/shell/shell_test_base.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 28 matching lines...) Expand all
39 39
40 base::FilePath base_dir = base::MakeAbsoluteFilePath( 40 base::FilePath base_dir = base::MakeAbsoluteFilePath(
41 base::CommandLine::ForCurrentProcess()->GetProgram().DirName()); 41 base::CommandLine::ForCurrentProcess()->GetProgram().DirName());
42 // On Mac and Windows, libraries are dumped beside the executables. 42 // On Mac and Windows, libraries are dumped beside the executables.
43 #if defined(OS_MACOSX) || defined(OS_WIN) 43 #if defined(OS_MACOSX) || defined(OS_WIN)
44 base::FilePath service_dir(base_dir); 44 base::FilePath service_dir(base_dir);
45 #else 45 #else
46 // On Linux, they're under lib/. 46 // On Linux, they're under lib/.
47 base::FilePath service_dir(base_dir.AppendASCII("lib")); 47 base::FilePath service_dir(base_dir.AppendASCII("lib"));
48 #endif 48 #endif
49 shell_context_->set_mojo_origin(net::FilePathToFileURL(service_dir).spec()); 49 shell_context_->mojo_url_resolver()->set_origin(
50 net::FilePathToFileURL(service_dir).spec());
50 51
51 shell_context_->service_manager()->ConnectToService( 52 shell_context_->service_manager()->ConnectToService(
52 service_url, service_name, client_handle.Pass(), GURL()); 53 service_url, service_name, client_handle.Pass(), GURL());
53 } 54 }
54 55
55 } // namespace test 56 } // namespace test
56 } // namespace shell 57 } // namespace shell
57 } // namespace mojo 58 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/run.cc ('k') | mojo/shell/storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698