| 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 <string.h> | 7 #include <string.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 if (!NaClBrokerService::GetInstance()->LaunchLoader( | 594 if (!NaClBrokerService::GetInstance()->LaunchLoader( |
| 595 weak_factory_.GetWeakPtr(), mojo_channel_token)) { | 595 weak_factory_.GetWeakPtr(), mojo_channel_token)) { |
| 596 SendErrorToRenderer("broker service did not launch process"); | 596 SendErrorToRenderer("broker service did not launch process"); |
| 597 return false; | 597 return false; |
| 598 } | 598 } |
| 599 return true; | 599 return true; |
| 600 } | 600 } |
| 601 #endif | 601 #endif |
| 602 process_->Launch( | 602 process_->Launch( |
| 603 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), | 603 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), |
| 604 cmd_line.release(), nullptr, true); | 604 cmd_line.release(), true); |
| 605 return true; | 605 return true; |
| 606 } | 606 } |
| 607 | 607 |
| 608 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 608 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 609 if (uses_nonsfi_mode_) { | 609 if (uses_nonsfi_mode_) { |
| 610 // IPC messages relating to NaCl's validation cache must not be exposed | 610 // IPC messages relating to NaCl's validation cache must not be exposed |
| 611 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate | 611 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate |
| 612 // to create a hole in the SFI sandbox. | 612 // to create a hole in the SFI sandbox. |
| 613 // In Non-SFI mode, no message is expected. | 613 // In Non-SFI mode, no message is expected. |
| 614 return false; | 614 return false; |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 NaClStartDebugExceptionHandlerThread( | 1187 NaClStartDebugExceptionHandlerThread( |
| 1188 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), | 1188 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), |
| 1189 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1189 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1190 weak_factory_.GetWeakPtr())); | 1190 weak_factory_.GetWeakPtr())); |
| 1191 return true; | 1191 return true; |
| 1192 } | 1192 } |
| 1193 } | 1193 } |
| 1194 #endif | 1194 #endif |
| 1195 | 1195 |
| 1196 } // namespace nacl | 1196 } // namespace nacl |
| OLD | NEW |