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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 if (!NaClBrokerService::GetInstance()->LaunchLoader( | 619 if (!NaClBrokerService::GetInstance()->LaunchLoader( |
620 weak_factory_.GetWeakPtr(), channel_id)) { | 620 weak_factory_.GetWeakPtr(), channel_id)) { |
621 SendErrorToRenderer("broker service did not launch process"); | 621 SendErrorToRenderer("broker service did not launch process"); |
622 return false; | 622 return false; |
623 } | 623 } |
624 return true; | 624 return true; |
625 } | 625 } |
626 #endif | 626 #endif |
627 process_->Launch( | 627 process_->Launch( |
628 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), | 628 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), |
629 cmd_line.release()); | 629 cmd_line.release(), |
| 630 true); |
630 return true; | 631 return true; |
631 } | 632 } |
632 | 633 |
633 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 634 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
634 bool handled = true; | 635 bool handled = true; |
635 if (uses_nonsfi_mode_) { | 636 if (uses_nonsfi_mode_) { |
636 // IPC messages relating to NaCl's validation cache must not be exposed | 637 // IPC messages relating to NaCl's validation cache must not be exposed |
637 // in Non-SFI Mode, otherwise a Non-SFI nexe could use | 638 // in Non-SFI Mode, otherwise a Non-SFI nexe could use |
638 // SetKnownToValidate to create a hole in the SFI sandbox. | 639 // SetKnownToValidate to create a hole in the SFI sandbox. |
639 IPC_BEGIN_MESSAGE_MAP(NaClProcessHost, msg) | 640 IPC_BEGIN_MESSAGE_MAP(NaClProcessHost, msg) |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 process.Pass(), info, | 1208 process.Pass(), info, |
1208 base::MessageLoopProxy::current(), | 1209 base::MessageLoopProxy::current(), |
1209 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1210 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1210 weak_factory_.GetWeakPtr())); | 1211 weak_factory_.GetWeakPtr())); |
1211 return true; | 1212 return true; |
1212 } | 1213 } |
1213 } | 1214 } |
1214 #endif | 1215 #endif |
1215 | 1216 |
1216 } // namespace nacl | 1217 } // namespace nacl |
OLD | NEW |