diff options
author | erikchen <erikchen@chromium.org> | 2016-02-02 20:44:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-03 04:46:32 +0000 |
commit | 0da942591fbe276f33c484e8e1e55e069b3c05fb (patch) | |
tree | 0b13e022be5766f48692f1c326cbb34d8bf57f1e /remoting/host/desktop_session_proxy.cc | |
parent | cdf2d5219c4ab50e927bc3795ca6a3d334365311 (diff) | |
download | chromium_src-0da942591fbe276f33c484e8e1e55e069b3c05fb.zip chromium_src-0da942591fbe276f33c484e8e1e55e069b3c05fb.tar.gz chromium_src-0da942591fbe276f33c484e8e1e55e069b3c05fb.tar.bz2 |
Enable attachment brokering of SharedMemoryHandle on Windows.
Whenever a SharedMemoryHandle associated with the current process is passed as a
parameter to a Chrome IPC message, the object is automatically brokered into the
destination process. This means it is no longer necessary to have a constructor
of SharedMemoryHandle that takes a ProcessHandle, since the SharedMemoryHandle
is always associated with the current process.
BUG=493414
Committed: https://crrev.com/7ceb8901740c35cd8ebfb92739efaf2ee441391e
Cr-Commit-Position: refs/heads/master@{#370193}
Review URL: https://codereview.chromium.org/1588683003
Cr-Commit-Position: refs/heads/master@{#373174}
Diffstat (limited to 'remoting/host/desktop_session_proxy.cc')
-rw-r--r-- | remoting/host/desktop_session_proxy.cc | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc index 8d05833..a7bfdba 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -49,14 +49,9 @@ class DesktopSessionProxy::IpcSharedBufferCore public: IpcSharedBufferCore(int id, base::SharedMemoryHandle handle, - base::ProcessHandle process, size_t size) : id_(id), -#if defined(OS_WIN) - shared_memory_(handle, kReadOnly, process), -#else // !defined(OS_WIN) shared_memory_(handle, kReadOnly), -#endif // !defined(OS_WIN) size_(size) { if (!shared_memory_.Map(size)) { LOG(ERROR) << "Failed to map a shared buffer: id=" << id @@ -475,7 +470,7 @@ void DesktopSessionProxy::OnCreateSharedBuffer( DCHECK(caller_task_runner_->BelongsToCurrentThread()); scoped_refptr<IpcSharedBufferCore> shared_buffer = - new IpcSharedBufferCore(id, handle, desktop_process_.Handle(), size); + new IpcSharedBufferCore(id, handle, size); if (shared_buffer->memory() != nullptr && !shared_buffers_.insert(std::make_pair(id, shared_buffer)).second) { |