| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/nacl_host/nacl_process_host.h" | 7 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 return false; | 133 return false; |
| 134 | 134 |
| 135 CommandLine* cmd_line = new CommandLine(exe_path); | 135 CommandLine* cmd_line = new CommandLine(exe_path); |
| 136 nacl::CopyNaClCommandLineArguments(cmd_line); | 136 nacl::CopyNaClCommandLineArguments(cmd_line); |
| 137 | 137 |
| 138 cmd_line->AppendSwitchASCII(switches::kProcessType, | 138 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 139 switches::kNaClLoaderProcess); | 139 switches::kNaClLoaderProcess); |
| 140 | 140 |
| 141 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); | 141 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
| 142 | 142 |
| 143 SetCrashReporterCommandLine(cmd_line); |
| 144 |
| 143 // On Windows we might need to start the broker process to launch a new loader | 145 // On Windows we might need to start the broker process to launch a new loader |
| 144 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
| 145 if (running_on_wow64_) { | 147 if (running_on_wow64_) { |
| 146 NaClBrokerService::GetInstance()->Init(resource_dispatcher_host_); | 148 NaClBrokerService::GetInstance()->Init(resource_dispatcher_host_); |
| 147 return NaClBrokerService::GetInstance()->LaunchLoader(this, | 149 return NaClBrokerService::GetInstance()->LaunchLoader(this, |
| 148 ASCIIToWide(channel_id())); | 150 ASCIIToWide(channel_id())); |
| 149 } else { | 151 } else { |
| 150 BrowserChildProcessHost::Launch(FilePath(), cmd_line); | 152 BrowserChildProcessHost::Launch(FilePath(), cmd_line); |
| 151 } | 153 } |
| 152 #elif defined(OS_POSIX) | 154 #elif defined(OS_POSIX) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (fnIsWow64Process != NULL) { | 306 if (fnIsWow64Process != NULL) { |
| 305 BOOL bIsWow64 = FALSE; | 307 BOOL bIsWow64 = FALSE; |
| 306 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { | 308 if (fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { |
| 307 if (bIsWow64) { | 309 if (bIsWow64) { |
| 308 running_on_wow64_ = true; | 310 running_on_wow64_ = true; |
| 309 } | 311 } |
| 310 } | 312 } |
| 311 } | 313 } |
| 312 } | 314 } |
| 313 #endif | 315 #endif |
| OLD | NEW |