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

Side by Side Diff: mojo/nacl/monacl_shell.cc

Issue 955113002: Rearrange mojo/nacl files. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 9 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
« no previous file with comments | « mojo/nacl/monacl_sel_main.cc ('k') | mojo/public/platform/nacl/BUILD.gn » ('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 <iostream> 5 #include <iostream>
6 6
7 #include "base/files/file.h" 7 #include "base/files/file.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/embedder/embedder.h" 10 #include "mojo/edk/embedder/embedder.h"
11 #include "mojo/edk/embedder/simple_platform_support.h" 11 #include "mojo/edk/embedder/simple_platform_support.h"
12 #include "mojo/nacl/monacl_sel_main.h" 12 #include "nacl_bindings/monacl_sel_main.h"
13 #include "native_client/src/public/nacl_desc.h" 13 #include "native_client/src/public/nacl_desc.h"
14 14
15 NaClDesc* OpenFile(const char* filename) { 15 NaClDesc* OpenFile(const char* filename) {
16 base::FilePath path(filename); 16 base::FilePath path(filename);
17 base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ); 17 base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
18 if (!file.IsValid()) { 18 if (!file.IsValid()) {
19 perror(filename); 19 perror(filename);
20 exit(1); 20 exit(1);
21 } 21 }
22 return NaClDescCreateWithFilePathMetadata(file.TakePlatformFile(), ""); 22 return NaClDescCreateWithFilePathMetadata(file.TakePlatformFile(), "");
(...skipping 16 matching lines...) Expand all
39 new mojo::embedder::SimplePlatformSupport())); 39 new mojo::embedder::SimplePlatformSupport()));
40 40
41 int exit_code = mojo::LaunchNaCl(nexe_desc, irt_desc, argc - 2, argv + 2, 41 int exit_code = mojo::LaunchNaCl(nexe_desc, irt_desc, argc - 2, argv + 2,
42 MOJO_HANDLE_INVALID); 42 MOJO_HANDLE_INVALID);
43 43
44 // Exits the process cleanly, does not return. 44 // Exits the process cleanly, does not return.
45 mojo::NaClExit(exit_code); 45 mojo::NaClExit(exit_code);
46 NOTREACHED(); 46 NOTREACHED();
47 return 1; 47 return 1;
48 } 48 }
OLDNEW
« no previous file with comments | « mojo/nacl/monacl_sel_main.cc ('k') | mojo/public/platform/nacl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698