| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 return ChildProcess::current()->GetShutDownEvent(); | 174 return ChildProcess::current()->GetShutDownEvent(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( | 177 IPC::PlatformFileForTransit PpapiThread::ShareHandleWithRemote( |
| 178 base::PlatformFile handle, | 178 base::PlatformFile handle, |
| 179 base::ProcessId peer_pid, | 179 base::ProcessId peer_pid, |
| 180 bool should_close_source) { | 180 bool should_close_source) { |
| 181 #if defined(OS_WIN) | 181 #if defined(OS_WIN) |
| 182 if (peer_handle_.IsValid()) { | 182 if (peer_handle_.IsValid()) { |
| 183 DCHECK(is_broker_); | 183 DCHECK(is_broker_); |
| 184 return IPC::GetFileHandleForProcess(handle, peer_handle_, | 184 return IPC::GetFileHandleForProcess(handle, peer_handle_.Get(), |
| 185 should_close_source); | 185 should_close_source); |
| 186 } | 186 } |
| 187 #endif | 187 #endif |
| 188 | 188 |
| 189 DCHECK(peer_pid != base::kNullProcessId); | 189 DCHECK(peer_pid != base::kNullProcessId); |
| 190 return BrokerGetFileHandleForProcess(handle, peer_pid, should_close_source); | 190 return BrokerGetFileHandleForProcess(handle, peer_pid, should_close_source); |
| 191 } | 191 } |
| 192 | 192 |
| 193 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { | 193 std::set<PP_Instance>* PpapiThread::GetGloballySeenInstanceIDSet() { |
| 194 return &globally_seen_instance_ids_; | 194 return &globally_seen_instance_ids_; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + | 543 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + |
| 544 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); | 544 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); |
| 545 | 545 |
| 546 // For sparse histograms, we can use the macro, as it does not incorporate a | 546 // For sparse histograms, we can use the macro, as it does not incorporate a |
| 547 // static. | 547 // static. |
| 548 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); | 548 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); |
| 549 #endif | 549 #endif |
| 550 } | 550 } |
| 551 | 551 |
| 552 } // namespace content | 552 } // namespace content |
| OLD | NEW |