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

Unified Diff: mojo/shell/launcher_main.cc

Issue 758273003: Enable logging from mojo_launcher (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase Created 6 years 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/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/launcher_main.cc
diff --git a/mojo/shell/launcher_main.cc b/mojo/shell/launcher_main.cc
index 7c2c369a1568ed82ee1aea7fcf1b06962771aee6..342446b4b8cf43e8fab5c83cd76578164bcc4dab 100644
--- a/mojo/shell/launcher_main.cc
+++ b/mojo/shell/launcher_main.cc
@@ -12,6 +12,7 @@
#include "mojo/edk/embedder/simple_platform_support.h"
#include "mojo/shell/external_application_registrar_connection.h"
#include "mojo/shell/in_process_dynamic_service_runner.h"
+#include "mojo/shell/init.h"
#include "url/gurl.h"
namespace {
@@ -97,18 +98,22 @@ int main(int argc, char** argv) {
base::AtExitManager at_exit;
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
- base::CommandLine command_line(argc, argv);
- Launcher launcher(&command_line);
+
+ base::CommandLine::Init(argc, argv);
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ mojo::shell::InitializeLogging();
+
+ Launcher launcher(command_line);
int result = launcher.Connect();
if (result < 0) {
LOG(ERROR) << "Error(" << result << ") connecting on socket "
- << command_line.GetSwitchValueASCII(kShellPath);
+ << command_line->GetSwitchValueASCII(kShellPath);
return MOJO_RESULT_INVALID_ARGUMENT;
}
if (!launcher.Register()) {
LOG(ERROR) << "Error registering "
- << command_line.GetSwitchValueASCII(kAppURL);
+ << command_line->GetSwitchValueASCII(kAppURL);
return MOJO_RESULT_INVALID_ARGUMENT;
}
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698