Index: base/memory/shared_memory_posix.cc |
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc |
index 91fd3529e0f7dae080b558de42bee6de77193740..e3f333d657eb76e70d224251420e0931139747fe 100644 |
--- a/base/memory/shared_memory_posix.cc |
+++ b/base/memory/shared_memory_posix.cc |
@@ -359,23 +359,4 @@ SharedMemoryHandle SharedMemory::GetReadOnlyHandle() { |
return readonly_shm_.Duplicate(); |
} |
-bool SharedMemory::GetUniqueId(SharedMemory::UniqueId* id) const { |
- // This function is called just after mmap. fstat is a system call that might |
- // cause I/O. It's safe to call fstat here because mmap for shared memory is |
- // called in two cases: |
- // 1) To handle file-mapped memory |
- // 2) To handle annonymous shared memory |
- // In 1), I/O is already permitted. In 2), the backend is on page cache and |
- // fstat doesn't cause I/O access to the disk. See the discussion at |
- // crbug.com/604726#c41. |
- base::ThreadRestrictions::ScopedAllowIO allow_io; |
- struct stat file_stat; |
- if (HANDLE_EINTR( |
- ::fstat(static_cast<int>(handle().GetHandle()), &file_stat)) != 0) |
- return false; |
- id->first = file_stat.st_dev; |
- id->second = file_stat.st_ino; |
- return true; |
-} |
- |
} // namespace base |