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

Unified Diff: mojo/application/application_runner_chromium.cc

Issue 1057603003: Simplify mojo_shell since it's now only used for Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update scripts 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/application/application_runner_chromium.h ('k') | mojo/application/application_test_base_chromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/application/application_runner_chromium.cc
diff --git a/mojo/application/application_runner_chromium.cc b/mojo/application/application_runner_chromium.cc
index 069ff90e346b73affdf6a940c690ce63cb747a9e..e5f21caa20b9a19c5e604fdbca48496555e95b5a 100644
--- a/mojo/application/application_runner_chromium.cc
+++ b/mojo/application/application_runner_chromium.cc
@@ -13,6 +13,18 @@
#include "mojo/public/cpp/application/application_delegate.h"
#include "mojo/public/cpp/application/application_impl.h"
+int g_argc;
+const char* const* g_argv;
+#if !defined(OS_WIN)
+extern "C" {
+__attribute__((visibility("default"))) void InitCommandLineArgs(
+ int argc, const char* const* argv) {
+ g_argc = argc;
+ g_argv = argv;
+}
+}
+#endif
+
namespace mojo {
// static
@@ -29,6 +41,10 @@ ApplicationRunnerChromium::ApplicationRunnerChromium(
ApplicationRunnerChromium::~ApplicationRunnerChromium() {}
+void ApplicationRunnerChromium::InitBaseCommandLine() {
+ base::CommandLine::Init(g_argc, g_argv);
+}
+
void ApplicationRunnerChromium::set_message_loop_type(
base::MessageLoop::Type type) {
DCHECK_NE(base::MessageLoop::TYPE_CUSTOM, type);
@@ -42,7 +58,7 @@ MojoResult ApplicationRunnerChromium::Run(
DCHECK(!has_run_);
has_run_ = true;
- base::CommandLine::Init(0, NULL);
+ InitBaseCommandLine();
base::AtExitManager at_exit;
#ifndef NDEBUG
« no previous file with comments | « mojo/application/application_runner_chromium.h ('k') | mojo/application/application_test_base_chromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698