| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/broker/nacl_broker_listener.h" | 5 #include "components/nacl/broker/nacl_broker_listener.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/process/launch.h" | 13 #include "base/process/launch.h" |
| 14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
| 15 #include "base/process/process_handle.h" | 15 #include "base/process/process_handle.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 17 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "base/win/win_util.h" | 18 #include "base/win/win_util.h" |
| 19 #include "components/nacl/common/nacl_cmd_line.h" | 19 #include "components/nacl/common/nacl_cmd_line.h" |
| 20 #include "components/nacl/common/nacl_debug_exception_handler_win.h" | 20 #include "components/nacl/common/nacl_debug_exception_handler_win.h" |
| 21 #include "components/nacl/common/nacl_messages.h" | 21 #include "components/nacl/common/nacl_messages.h" |
| 22 #include "components/nacl/common/nacl_switches.h" | 22 #include "components/nacl/common/nacl_switches.h" |
| 23 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
| 24 #include "content/public/common/mojo_channel_switches.h" | 24 #include "content/public/common/mojo_channel_switches.h" |
| 25 #include "content/public/common/sandbox_init.h" | 25 #include "content/public/common/sandbox_init.h" |
| 26 #include "ipc/attachment_broker_unprivileged.h" | 26 #include "ipc/attachment_broker_unprivileged.h" |
| 27 #include "ipc/ipc_channel.h" | 27 #include "ipc/ipc_channel.h" |
| 28 #include "ipc/ipc_switches.h" | |
| 29 #include "mojo/edk/embedder/embedder.h" | 28 #include "mojo/edk/embedder/embedder.h" |
| 30 #include "mojo/edk/embedder/platform_channel_pair.h" | 29 #include "mojo/edk/embedder/platform_channel_pair.h" |
| 31 #include "mojo/public/cpp/system/message_pipe.h" | 30 #include "mojo/public/cpp/system/message_pipe.h" |
| 32 #include "sandbox/win/src/sandbox_policy.h" | 31 #include "sandbox/win/src/sandbox_policy.h" |
| 33 | 32 |
| 34 namespace { | 33 namespace { |
| 35 | 34 |
| 36 void SendReply(IPC::Channel* channel, int32_t pid, bool result) { | 35 void SendReply(IPC::Channel* channel, int32_t pid, bool result) { |
| 37 channel->Send(new NaClProcessMsg_DebugExceptionHandlerLaunched(pid, result)); | 36 channel->Send(new NaClProcessMsg_DebugExceptionHandlerLaunched(pid, result)); |
| 38 } | 37 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const std::string& startup_info) { | 192 const std::string& startup_info) { |
| 194 NaClStartDebugExceptionHandlerThread( | 193 NaClStartDebugExceptionHandlerThread( |
| 195 base::Process(process_handle), startup_info, | 194 base::Process(process_handle), startup_info, |
| 196 base::ThreadTaskRunnerHandle::Get(), | 195 base::ThreadTaskRunnerHandle::Get(), |
| 197 base::Bind(SendReply, channel_.get(), pid)); | 196 base::Bind(SendReply, channel_.get(), pid)); |
| 198 } | 197 } |
| 199 | 198 |
| 200 void NaClBrokerListener::OnStopBroker() { | 199 void NaClBrokerListener::OnStopBroker() { |
| 201 run_loop_.QuitWhenIdle(); | 200 run_loop_.QuitWhenIdle(); |
| 202 } | 201 } |
| OLD | NEW |