| 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 <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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 std::endl; | 28 std::endl; |
| 29 return 1; | 29 return 1; |
| 30 } | 30 } |
| 31 | 31 |
| 32 const char* irt_file = argv[1]; | 32 const char* irt_file = argv[1]; |
| 33 const char* nexe_file = argv[2]; | 33 const char* nexe_file = argv[2]; |
| 34 | 34 |
| 35 NaClDesc* irt_desc = OpenFile(irt_file); | 35 NaClDesc* irt_desc = OpenFile(irt_file); |
| 36 NaClDesc* nexe_desc = OpenFile(nexe_file); | 36 NaClDesc* nexe_desc = OpenFile(nexe_file); |
| 37 | 37 |
| 38 mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>( | 38 // TODO(vtl): Use make_unique when C++14 is available. |
| 39 mojo::embedder::Init(std::unique_ptr<mojo::embedder::PlatformSupport>( |
| 39 new mojo::embedder::SimplePlatformSupport())); | 40 new mojo::embedder::SimplePlatformSupport())); |
| 40 | 41 |
| 41 int exit_code = mojo::LaunchNaCl(nexe_desc, irt_desc, argc - 2, argv + 2, | 42 int exit_code = mojo::LaunchNaCl(nexe_desc, irt_desc, argc - 2, argv + 2, |
| 42 MOJO_HANDLE_INVALID); | 43 MOJO_HANDLE_INVALID); |
| 43 | 44 |
| 44 // Exits the process cleanly, does not return. | 45 // Exits the process cleanly, does not return. |
| 45 mojo::NaClExit(exit_code); | 46 mojo::NaClExit(exit_code); |
| 46 NOTREACHED(); | 47 NOTREACHED(); |
| 47 return 1; | 48 return 1; |
| 48 } | 49 } |
| OLD | NEW |