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 "content/ppapi_plugin/ppapi_thread.h" | 5 #include "content/ppapi_plugin/ppapi_thread.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 return ChildProcess::current()->GetShutDownEvent(); | 188 return ChildProcess::current()->GetShutDownEvent(); |
189 } | 189 } |
190 | 190 |
191 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( | 191 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( |
192 base::PlatformFile handle, | 192 base::PlatformFile handle, |
193 base::ProcessId peer_pid, | 193 base::ProcessId peer_pid, |
194 bool should_close_source) { | 194 bool should_close_source) { |
195 #if defined(OS_WIN) | 195 #if defined(OS_WIN) |
196 if (peer_handle_.IsValid()) { | 196 if (peer_handle_.IsValid()) { |
197 DCHECK(is_broker_); | 197 DCHECK(is_broker_); |
198 return IPC::GetFileHandleForProcess(handle, peer_handle_.Get(), | 198 return IPC::GetPlatformFileForTransit(handle, should_close_source); |
199 should_close_source); | |
200 } | 199 } |
201 #endif | 200 #endif |
202 | 201 |
203 DCHECK(peer_pid != base::kNullProcessId); | 202 DCHECK(peer_pid != base::kNullProcessId); |
204 return BrokerGetFileHandleForProcess(handle, peer_pid, should_close_source); | 203 return BrokerGetFileHandleForProcess(handle, peer_pid, should_close_source); |
205 } | 204 } |
206 | 205 |
207 base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote( | 206 base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote( |
208 const base::SharedMemoryHandle& handle, | 207 const base::SharedMemoryHandle& handle, |
209 base::ProcessId remote_pid) { | 208 base::ProcessId remote_pid) { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 GetHistogramName(is_broker_, "LoadTime", path), | 594 GetHistogramName(is_broker_, "LoadTime", path), |
596 base::TimeDelta::FromMilliseconds(1), | 595 base::TimeDelta::FromMilliseconds(1), |
597 base::TimeDelta::FromSeconds(10), | 596 base::TimeDelta::FromSeconds(10), |
598 50, | 597 50, |
599 base::HistogramBase::kUmaTargetedHistogramFlag); | 598 base::HistogramBase::kUmaTargetedHistogramFlag); |
600 | 599 |
601 histogram->AddTime(load_time); | 600 histogram->AddTime(load_time); |
602 } | 601 } |
603 | 602 |
604 } // namespace content | 603 } // namespace content |
OLD | NEW |