Add methods to base::SharedMemory to replace common SharedMemoryHandle operations.
commit8539d85a060f79993354ba68b1fb3c5a66b119ad
authorerikchen <erikchen@chromium.org>
Sat, 30 May 2015 01:49:19 +0000 (29 18:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 30 May 2015 01:49:39 +0000 (30 01:49 +0000)
treed169e865302154f2c6b36701017c1454d6f69cd7
parent9c3727e391078f454885b2cb12c501f9e1893c5f
Add methods to base::SharedMemory to replace common SharedMemoryHandle operations.

Existing Chrome code assumes that base::SharedMemoryHandle is typedefed to
"int", and that base::SharedMemoryHandle is backed by an fd on POSIX. This CL
adds the static methods ShallowCopyOfHandle() and DeepCopyOfHandle(), which will
replace existing "int" copies and calls to dup().

BUG=466437

Review URL: https://codereview.chromium.org/1164473003

Cr-Commit-Position: refs/heads/master@{#332098}
base/memory/shared_memory.h
base/memory/shared_memory_posix.cc
base/memory/shared_memory_win.cc