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

Unified Diff: mojo/shell/native_application_support.cc

Issue 1082513002: Revert of Simplify mojo_shell since it's now only used for Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 5 years, 8 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/shell/desktop/launcher_process.cc ('k') | mojo/shell/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/native_application_support.cc
diff --git a/mojo/shell/native_application_support.cc b/mojo/shell/native_application_support.cc
index 9df3ed887f0975f090035e082af7ef672ad9d1fe..55ae2cf96a1ad7c768485ce165dd22baece2a2f8 100644
--- a/mojo/shell/native_application_support.cc
+++ b/mojo/shell/native_application_support.cc
@@ -4,7 +4,6 @@
#include "mojo/shell/native_application_support.h"
-#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
@@ -105,26 +104,6 @@ bool RunNativeApplication(base::NativeLibrary app_library,
init_go_runtime();
}
-#if !defined(OS_WIN)
- // On Windows, initializing base::CommandLine with null parameters gets the
- // process's command line from the OS. Other platforms need it to be passed
- // in. This needs to be passed in before the app initializes the command line,
- // which is done as soon as it loads.
- typedef void (*InitCommandLineArgs)(int, const char* const*);
- InitCommandLineArgs init_command_line_args =
- reinterpret_cast<InitCommandLineArgs>(
- base::GetFunctionPointerFromNativeLibrary(app_library,
- "InitCommandLineArgs"));
- if (init_command_line_args) {
- int argc = 0;
- base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
- const char** argv = new const char* [cmd_line->argv().size()];
- for (auto& arg : cmd_line->argv())
- argv[argc++] = arg.c_str();
- init_command_line_args(argc, argv);
- }
-#endif
-
typedef MojoResult (*MojoMainFunction)(MojoHandle);
MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>(
base::GetFunctionPointerFromNativeLibrary(app_library, "MojoMain"));
« no previous file with comments | « mojo/shell/desktop/launcher_process.cc ('k') | mojo/shell/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698