diff options
Diffstat (limited to 'base/file_util.cc')
-rw-r--r-- | base/file_util.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/base/file_util.cc b/base/file_util.cc index 8d1b517..4cde773 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -267,20 +267,6 @@ MemoryMappedFile::~MemoryMappedFile() { CloseHandles(); } -bool MemoryMappedFile::Initialize(base::PlatformFile file) { - if (IsValid()) - return false; - - file_ = file; - - if (!MapFileToMemoryInternal()) { - CloseHandles(); - return false; - } - - return true; -} - bool MemoryMappedFile::Initialize(const FilePath& file_name) { if (IsValid()) return false; @@ -293,19 +279,6 @@ bool MemoryMappedFile::Initialize(const FilePath& file_name) { return true; } -bool MemoryMappedFile::MapFileToMemory(const FilePath& file_name) { - file_ = base::CreatePlatformFile(file_name, - base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, - NULL); - - if (file_ == base::kInvalidPlatformFileValue) { - LOG(ERROR) << "Couldn't open " << file_name.value(); - return false; - } - - return MapFileToMemoryInternal(); -} - bool MemoryMappedFile::IsValid() { return data_ != NULL; } |