| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 FilePath exe_path = GetChildPath(flags); | 163 FilePath exe_path = GetChildPath(flags); |
| 164 if (exe_path.empty()) | 164 if (exe_path.empty()) |
| 165 return false; | 165 return false; |
| 166 | 166 |
| 167 CommandLine* cmd_line = new CommandLine(exe_path); | 167 CommandLine* cmd_line = new CommandLine(exe_path); |
| 168 nacl::CopyNaClCommandLineArguments(cmd_line); | 168 nacl::CopyNaClCommandLineArguments(cmd_line); |
| 169 | 169 |
| 170 cmd_line->AppendSwitchASCII(switches::kProcessType, | 170 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 171 switches::kNaClLoaderProcess); | 171 switches::kNaClLoaderProcess); |
| 172 | |
| 173 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); | 172 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id()); |
| 173 if (logging::DialogsAreSuppressed()) |
| 174 cmd_line->AppendSwitch(switches::kNoErrorDialogs); |
| 174 | 175 |
| 175 if (!nacl_loader_prefix.empty()) | 176 if (!nacl_loader_prefix.empty()) |
| 176 cmd_line->PrependWrapper(nacl_loader_prefix); | 177 cmd_line->PrependWrapper(nacl_loader_prefix); |
| 177 | 178 |
| 178 // On Windows we might need to start the broker process to launch a new loader | 179 // On Windows we might need to start the broker process to launch a new loader |
| 179 #if defined(OS_WIN) | 180 #if defined(OS_WIN) |
| 180 if (running_on_wow64_) { | 181 if (running_on_wow64_) { |
| 181 return NaClBrokerService::GetInstance()->LaunchLoader( | 182 return NaClBrokerService::GetInstance()->LaunchLoader( |
| 182 this, ASCIIToWide(channel_id())); | 183 this, ASCIIToWide(channel_id())); |
| 183 } else { | 184 } else { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 } | 384 } |
| 384 | 385 |
| 385 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 386 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 386 NOTREACHED() << "Invalid message with type = " << msg.type(); | 387 NOTREACHED() << "Invalid message with type = " << msg.type(); |
| 387 return false; | 388 return false; |
| 388 } | 389 } |
| 389 | 390 |
| 390 bool NaClProcessHost::CanShutdown() { | 391 bool NaClProcessHost::CanShutdown() { |
| 391 return true; | 392 return true; |
| 392 } | 393 } |
| OLD | NEW |