diff options
author | erikchen <erikchen@chromium.org> | 2016-01-19 13:36:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-19 21:37:46 +0000 |
commit | 7ceb8901740c35cd8ebfb92739efaf2ee441391e (patch) | |
tree | 6bbae33336fd8967970f1b5e4117576096563472 /remoting/host/desktop_session_proxy.cc | |
parent | ff8a7383fdcfa996b2c673fdaafbab2eedd05d8c (diff) | |
download | chromium_src-7ceb8901740c35cd8ebfb92739efaf2ee441391e.zip chromium_src-7ceb8901740c35cd8ebfb92739efaf2ee441391e.tar.gz chromium_src-7ceb8901740c35cd8ebfb92739efaf2ee441391e.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
Review URL: https://codereview.chromium.org/1588683003
Cr-Commit-Position: refs/heads/master@{#370193}
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) { |