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