OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 env->SetVar(kPath, new_path); | 557 env->SetVar(kPath, new_path); |
558 } | 558 } |
559 #endif // _DLL | 559 #endif // _DLL |
560 } | 560 } |
561 #endif | 561 #endif |
562 | 562 |
563 scoped_ptr<CommandLine> cmd_line(new CommandLine(exe_path)); | 563 scoped_ptr<CommandLine> cmd_line(new CommandLine(exe_path)); |
564 CopyNaClCommandLineArguments(cmd_line.get()); | 564 CopyNaClCommandLineArguments(cmd_line.get()); |
565 | 565 |
566 cmd_line->AppendSwitchASCII(switches::kProcessType, | 566 cmd_line->AppendSwitchASCII(switches::kProcessType, |
| 567 uses_nonsfi_mode_ ? |
| 568 switches::kNaClNonSfiLoaderProcess : |
567 switches::kNaClLoaderProcess); | 569 switches::kNaClLoaderProcess); |
568 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 570 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
569 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) | 571 if (NaClBrowser::GetDelegate()->DialogsAreSuppressed()) |
570 cmd_line->AppendSwitch(switches::kNoErrorDialogs); | 572 cmd_line->AppendSwitch(switches::kNoErrorDialogs); |
571 | 573 |
572 // On Windows we might need to start the broker process to launch a new loader | 574 // On Windows we might need to start the broker process to launch a new loader |
573 #if defined(OS_WIN) | 575 #if defined(OS_WIN) |
574 if (RunningOnWOW64()) { | 576 if (RunningOnWOW64()) { |
575 if (!NaClBrokerService::GetInstance()->LaunchLoader( | 577 if (!NaClBrokerService::GetInstance()->LaunchLoader( |
576 weak_factory_.GetWeakPtr(), channel_id)) { | 578 weak_factory_.GetWeakPtr(), channel_id)) { |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 process_handle.Take(), info, | 1059 process_handle.Take(), info, |
1058 base::MessageLoopProxy::current(), | 1060 base::MessageLoopProxy::current(), |
1059 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1061 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1060 weak_factory_.GetWeakPtr())); | 1062 weak_factory_.GetWeakPtr())); |
1061 return true; | 1063 return true; |
1062 } | 1064 } |
1063 } | 1065 } |
1064 #endif | 1066 #endif |
1065 | 1067 |
1066 } // namespace nacl | 1068 } // namespace nacl |
OLD | NEW |