Skip to content

Commit

Permalink
Cleanup: Remove unused SharedMemory ctor.
Browse files Browse the repository at this point in the history
BUG=345734

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

Cr-Commit-Position: refs/heads/master@{#365776}
  • Loading branch information
leizleiz authored and Commit bot committed Dec 17, 2015
1 parent 7a89317 commit d3ede88
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 39 deletions.
2 changes: 2 additions & 0 deletions base/memory/shared_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ class BASE_EXPORT SharedMemory {
// that |read_only| matches the permissions of the handle.
SharedMemory(const SharedMemoryHandle& handle, bool read_only);

#if defined(OS_WIN)
// Create a new SharedMemory object from an existing, open
// shared memory file that was created by a remote process and not shared
// to the current process.
SharedMemory(const SharedMemoryHandle& handle,
bool read_only,
ProcessHandle process);
#endif

// Closes any open files.
~SharedMemory();
Expand Down
14 changes: 0 additions & 14 deletions base/memory/shared_memory_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,6 @@ SharedMemory::SharedMemory(const SharedMemoryHandle& handle, bool read_only)
read_only_(read_only),
requested_size_(0) {}

SharedMemory::SharedMemory(const SharedMemoryHandle& handle,
bool read_only,
ProcessHandle process)
: mapped_memory_mechanism_(SharedMemoryHandle::POSIX),
readonly_mapped_file_(-1),
mapped_size_(0),
memory_(NULL),
read_only_(read_only),
requested_size_(0) {
// We don't handle this case yet (note the ignored parameter); let's die if
// someone comes calling.
NOTREACHED();
}

SharedMemory::~SharedMemory() {
Unmap();
Close();
Expand Down
11 changes: 0 additions & 11 deletions base/memory/shared_memory_nacl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ SharedMemory::SharedMemory(const SharedMemoryHandle& handle, bool read_only)
requested_size_(0) {
}

SharedMemory::SharedMemory(const SharedMemoryHandle& handle,
bool read_only,
ProcessHandle process)
: mapped_file_(handle.fd),
mapped_size_(0),
memory_(NULL),
read_only_(read_only),
requested_size_(0) {
NOTREACHED();
}

SharedMemory::~SharedMemory() {
Unmap();
Close();
Expand Down
14 changes: 0 additions & 14 deletions base/memory/shared_memory_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,6 @@ SharedMemory::SharedMemory(const SharedMemoryHandle& handle, bool read_only)
requested_size_(0) {
}

SharedMemory::SharedMemory(const SharedMemoryHandle& handle,
bool read_only,
ProcessHandle process)
: mapped_file_(handle.fd),
readonly_mapped_file_(-1),
mapped_size_(0),
memory_(NULL),
read_only_(read_only),
requested_size_(0) {
// We don't handle this case yet (note the ignored parameter); let's die if
// someone comes calling.
NOTREACHED();
}

SharedMemory::~SharedMemory() {
Unmap();
Close();
Expand Down

0 comments on commit d3ede88

Please sign in to comment.