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

Unified Diff: remoting/host/desktop_session_proxy.cc

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. 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
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | sandbox/win/src/handle_inheritance_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index ba098f69e6224306d0b7858fad844760f1ef6dc7..27e8af6b5c5cd0c0de700947811788d4c8ba48fc 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -55,7 +55,7 @@ class DesktopSessionProxy::IpcSharedBufferCore
if (!shared_memory_.Map(size)) {
LOG(ERROR) << "Failed to map a shared buffer: id=" << id
#if defined(OS_WIN)
- << ", handle=" << handle
+ << ", handle=" << handle.GetHandle()
#else
<< ", handle.fd="
<< base::SharedMemory::GetFdFromSharedMemoryHandle(handle)
@@ -69,7 +69,7 @@ class DesktopSessionProxy::IpcSharedBufferCore
void* memory() { return shared_memory_.memory(); }
webrtc::SharedMemory::Handle handle() {
#if defined(OS_WIN)
- return shared_memory_.handle();
+ return shared_memory_.handle().GetHandle();
#else
return base::SharedMemory::GetFdFromSharedMemoryHandle(
shared_memory_.handle());
@@ -484,7 +484,12 @@ void DesktopSessionProxy::OnCreateSharedBuffer(
uint32 size) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
+#if defined(OS_WIN)
+ base::SharedMemoryHandle shm_handle =
+ base::SharedMemoryHandle(handle, base::GetCurrentProcId());
+#else
base::SharedMemoryHandle shm_handle = base::SharedMemoryHandle(handle);
+#endif
scoped_refptr<IpcSharedBufferCore> shared_buffer =
new IpcSharedBufferCore(id, shm_handle, desktop_process_.Handle(), size);
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | sandbox/win/src/handle_inheritance_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698