OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/nacl/broker_thread.h" | 5 #include "chrome/nacl/broker_thread.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/nacl_cmd_line.h" | 12 #include "chrome/common/nacl_cmd_line.h" |
13 #include "chrome/common/nacl_messages.h" | 13 #include "chrome/common/nacl_messages.h" |
14 #include "chrome/common/sandbox_policy.h" | |
15 #include "content/common/child_process.h" | 14 #include "content/common/child_process.h" |
| 15 #include "content/common/sandbox_policy.h" |
16 #include "ipc/ipc_switches.h" | 16 #include "ipc/ipc_switches.h" |
17 | 17 |
18 NaClBrokerThread::NaClBrokerThread() | 18 NaClBrokerThread::NaClBrokerThread() |
19 : browser_handle_(0), | 19 : browser_handle_(0), |
20 broker_services_(NULL) { | 20 broker_services_(NULL) { |
21 } | 21 } |
22 | 22 |
23 NaClBrokerThread::~NaClBrokerThread() { | 23 NaClBrokerThread::~NaClBrokerThread() { |
24 base::CloseProcessHandle(browser_handle_); | 24 base::CloseProcessHandle(browser_handle_); |
25 } | 25 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void NaClBrokerThread::OnStopBroker() { | 73 void NaClBrokerThread::OnStopBroker() { |
74 ChildProcess::current()->ReleaseProcess(); | 74 ChildProcess::current()->ReleaseProcess(); |
75 } | 75 } |
76 | 76 |
77 void NaClBrokerThread::OnChannelConnected(int32 peer_pid) { | 77 void NaClBrokerThread::OnChannelConnected(int32 peer_pid) { |
78 bool res = base::OpenProcessHandle(peer_pid, &browser_handle_); | 78 bool res = base::OpenProcessHandle(peer_pid, &browser_handle_); |
79 DCHECK(res); | 79 DCHECK(res); |
80 ChildProcess::current()->AddRefProcess(); | 80 ChildProcess::current()->AddRefProcess(); |
81 } | 81 } |
82 | 82 |
OLD | NEW |