 Chromium Code Reviews
 Chromium Code Reviews Issue 1341873002:
  Enabling 64-bit mojo shell to launch 32-bit child to handle nonsfi content.  (Closed) 
  Base URL: https://github.com/domokit/mojo.git@master
    
  
    Issue 1341873002:
  Enabling 64-bit mojo shell to launch 32-bit child to handle nonsfi content.  (Closed) 
  Base URL: https://github.com/domokit/mojo.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "shell/context.h" | 5 #include "shell/context.h" | 
| 6 | 6 | 
| 7 #include <vector> | 7 #include <vector> | 
| 8 | 8 | 
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 | 250 | 
| 251 GURL Context::ResolveCommandLineURL(const std::string& path) { | 251 GURL Context::ResolveCommandLineURL(const std::string& path) { | 
| 252 return command_line_cwd_.Resolve(path); | 252 return command_line_cwd_.Resolve(path); | 
| 253 } | 253 } | 
| 254 | 254 | 
| 255 bool Context::Init() { | 255 bool Context::Init() { | 
| 256 base::FilePath shell_path = base::MakeAbsoluteFilePath( | 256 base::FilePath shell_path = base::MakeAbsoluteFilePath( | 
| 257 base::CommandLine::ForCurrentProcess()->GetProgram()); | 257 base::CommandLine::ForCurrentProcess()->GetProgram()); | 
| 258 base::FilePath shell_child_path = | 258 base::FilePath shell_child_path = | 
| 259 shell_path.DirName().AppendASCII("mojo_shell_child"); | 259 shell_path.DirName().AppendASCII("mojo_shell_child"); | 
| 260 mojo_shell_child_path_32_bit_ = | |
| 261 shell_path.DirName().AppendASCII("clang_x86/mojo_shell_child"); | |
| 
Sean Klein
2015/09/14 18:10:33
I'm not entirely sure if I should be dependent on
 
Mark Seaborn
2015/09/14 18:38:58
I think this depends how mojo_shell gets packaged.
 
Petr Hosek
2015/09/14 19:13:52
The path is an artifact of the build system (GN in
 
Sean Klein
2015/09/15 18:37:50
Using a copy rule in the gn files -- now there are
 | |
| 260 return InitWithPaths(shell_child_path); | 262 return InitWithPaths(shell_child_path); | 
| 261 } | 263 } | 
| 262 | 264 | 
| 263 bool Context::InitWithPaths(const base::FilePath& shell_child_path) { | 265 bool Context::InitWithPaths(const base::FilePath& shell_child_path) { | 
| 264 TRACE_EVENT0("mojo_shell", "Context::InitWithPaths"); | 266 TRACE_EVENT0("mojo_shell", "Context::InitWithPaths"); | 
| 265 const base::CommandLine& command_line = | 267 const base::CommandLine& command_line = | 
| 266 *base::CommandLine::ForCurrentProcess(); | 268 *base::CommandLine::ForCurrentProcess(); | 
| 267 | 269 | 
| 268 if (command_line.HasSwitch(switches::kWaitForDebugger)) | 270 if (command_line.HasSwitch(switches::kWaitForDebugger)) | 
| 269 base::debug::WaitForDebugger(60, true); | 271 base::debug::WaitForDebugger(60, true); | 
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 app_urls_.erase(url); | 374 app_urls_.erase(url); | 
| 373 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { | 375 if (app_urls_.empty() && base::MessageLoop::current()->is_running()) { | 
| 374 DCHECK_EQ(base::MessageLoop::current()->task_runner(), | 376 DCHECK_EQ(base::MessageLoop::current()->task_runner(), | 
| 375 task_runners_->shell_runner()); | 377 task_runners_->shell_runner()); | 
| 376 base::MessageLoop::current()->Quit(); | 378 base::MessageLoop::current()->Quit(); | 
| 377 } | 379 } | 
| 378 } | 380 } | 
| 379 } | 381 } | 
| 380 | 382 | 
| 381 } // namespace shell | 383 } // namespace shell | 
| OLD | NEW |