Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1919)

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Fix DCHECK. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 1618519a586b3d86901e16ed338cddf95fd05b23..db058138f3a3601c1ac5dda4e802bef80d5d1dcf 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -206,7 +206,10 @@ base::SharedMemoryHandle PpapiThread::ShareSharedMemoryHandleWithRemote(
#if defined(OS_WIN)
if (peer_handle_.IsValid()) {
DCHECK(is_broker_);
- return IPC::GetFileHandleForProcess(handle, peer_handle_.Get(), false);
+ IPC::PlatformFileForTransit platform_file = IPC::GetFileHandleForProcess(
+ handle.GetHandle(), peer_handle_.Get(), false);
+ base::ProcessId pid = base::GetProcId(peer_handle_.Get());
+ return base::SharedMemoryHandle(platform_file, pid);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698