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

Unified Diff: mojo/nacl/sfi/monacl_shell.cc

Issue 2051163002: Nuke NaCl SFI, part 1. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/nacl/sfi/README.md ('k') | mojo/nacl/sfi/nacl_bindings/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/nacl/sfi/monacl_shell.cc
diff --git a/mojo/nacl/sfi/monacl_shell.cc b/mojo/nacl/sfi/monacl_shell.cc
deleted file mode 100644
index ca71fa4c6cd60b5057a50ae213d0845c928ba059..0000000000000000000000000000000000000000
--- a/mojo/nacl/sfi/monacl_shell.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <iostream>
-
-#include "base/files/file.h"
-#include "base/files/file_path.h"
-#include "base/logging.h"
-#include "mojo/edk/embedder/embedder.h"
-#include "mojo/edk/embedder/simple_platform_support.h"
-#include "mojo/nacl/sfi/nacl_bindings/monacl_sel_main.h"
-#include "native_client/src/public/nacl_desc.h"
-
-NaClDesc* OpenFile(const char* filename) {
- base::FilePath path(filename);
- base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ);
- if (!file.IsValid()) {
- perror(filename);
- exit(1);
- }
- return NaClDescCreateWithFilePathMetadata(file.TakePlatformFile(), "");
-}
-
-int main(int argc, char* argv[]) {
- if (argc < 3) {
- std::cout << "Usage: " << argv[0] << " irt.nexe app.nexe [args for app]" <<
- std::endl;
- return 1;
- }
-
- const char* irt_file = argv[1];
- const char* nexe_file = argv[2];
-
- NaClDesc* irt_desc = OpenFile(irt_file);
- NaClDesc* nexe_desc = OpenFile(nexe_file);
-
- mojo::embedder::Init(mojo::embedder::CreateSimplePlatformSupport());
-
- int exit_code = mojo::LaunchNaCl(nexe_desc, irt_desc, argc - 2, argv + 2,
- MOJO_HANDLE_INVALID);
-
- // Exits the process cleanly, does not return.
- mojo::NaClExit(exit_code);
- NOTREACHED();
- return 1;
-}
« no previous file with comments | « mojo/nacl/sfi/README.md ('k') | mojo/nacl/sfi/nacl_bindings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698