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

Unified Diff: shell/context.cc

Issue 1061413002: Shell: Make a separate binary for child processes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Don't look at kChildProcess in desktop/main.cc. 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
Index: shell/context.cc
diff --git a/shell/context.cc b/shell/context.cc
index 0ad30a4f171cfba10f1f9c7938756350f5afa0da..49e5fa3a812e52734902c439b608183ddcd0667b 100644
--- a/shell/context.cc
+++ b/shell/context.cc
@@ -235,16 +235,24 @@ GURL Context::ResolveCommandLineURL(const std::string& path) {
}
bool Context::Init() {
- TRACE_EVENT0("mojo_shell", "Context::Init");
+ base::FilePath shell_path = base::MakeAbsoluteFilePath(
+ base::CommandLine::ForCurrentProcess()->GetProgram());
+ base::FilePath shell_child_path =
+ shell_path.DirName().AppendASCII("mojo_shell_child");
+ return InitWithPaths(shell_path, shell_child_path);
+}
+
+bool Context::InitWithPaths(const base::FilePath& shell_path,
+ const base::FilePath& shell_child_path) {
+ TRACE_EVENT0("mojo_shell", "Context::InitWithPaths");
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kWaitForDebugger))
base::debug::WaitForDebugger(60, true);
- mojo_shell_path_ = base::MakeAbsoluteFilePath(command_line.GetProgram());
- // TODO(vtl): For the moment, the child is the same as the parent.
- mojo_shell_child_path_ = mojo_shell_path_;
+ mojo_shell_path_ = shell_path;
+ mojo_shell_child_path_ = shell_child_path;
EnsureEmbedderIsInitialized();
task_runners_.reset(
« shell/android/main.cc ('K') | « shell/context.h ('k') | shell/desktop/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698