| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 if (!NaClBrokerService::GetInstance()->LaunchLoader( | 662 if (!NaClBrokerService::GetInstance()->LaunchLoader( |
| 663 weak_factory_.GetWeakPtr(), mojo_channel_token)) { | 663 weak_factory_.GetWeakPtr(), mojo_channel_token)) { |
| 664 SendErrorToRenderer("broker service did not launch process"); | 664 SendErrorToRenderer("broker service did not launch process"); |
| 665 return false; | 665 return false; |
| 666 } | 666 } |
| 667 return true; | 667 return true; |
| 668 } | 668 } |
| 669 #endif | 669 #endif |
| 670 process_->Launch( | 670 process_->Launch( |
| 671 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), | 671 new NaClSandboxedProcessLauncherDelegate(process_->GetHost()), |
| 672 cmd_line.release(), | 672 cmd_line.release(), nullptr, true); |
| 673 true); | |
| 674 return true; | 673 return true; |
| 675 } | 674 } |
| 676 | 675 |
| 677 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { | 676 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { |
| 678 if (uses_nonsfi_mode_) { | 677 if (uses_nonsfi_mode_) { |
| 679 // IPC messages relating to NaCl's validation cache must not be exposed | 678 // IPC messages relating to NaCl's validation cache must not be exposed |
| 680 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate | 679 // in Non-SFI Mode, otherwise a Non-SFI nexe could use SetKnownToValidate |
| 681 // to create a hole in the SFI sandbox. | 680 // to create a hole in the SFI sandbox. |
| 682 // In Non-SFI mode, no message is expected. | 681 // In Non-SFI mode, no message is expected. |
| 683 return false; | 682 return false; |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 NaClStartDebugExceptionHandlerThread( | 1298 NaClStartDebugExceptionHandlerThread( |
| 1300 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), | 1299 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), |
| 1301 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1300 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
| 1302 weak_factory_.GetWeakPtr())); | 1301 weak_factory_.GetWeakPtr())); |
| 1303 return true; | 1302 return true; |
| 1304 } | 1303 } |
| 1305 } | 1304 } |
| 1306 #endif | 1305 #endif |
| 1307 | 1306 |
| 1308 } // namespace nacl | 1307 } // namespace nacl |
| OLD | NEW |