From eae9c0623d1800201739b4be146649103a45cd93 Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Tue, 11 Jan 2011 00:50:59 +0000 Subject: Order function definitions in base/ according to the header. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6085015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70975 0039d316-1c4b-4281-b951-d872f2087c98 --- base/file_util.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'base/file_util.cc') diff --git a/base/file_util.cc b/base/file_util.cc index d1a46c9..c9661e7 100644 --- a/base/file_util.cc +++ b/base/file_util.cc @@ -315,13 +315,11 @@ MemoryMappedFile::~MemoryMappedFile() { CloseHandles(); } -bool MemoryMappedFile::Initialize(base::PlatformFile file) { +bool MemoryMappedFile::Initialize(const FilePath& file_name) { if (IsValid()) return false; - file_ = file; - - if (!MapFileToMemoryInternal()) { + if (!MapFileToMemory(file_name)) { CloseHandles(); return false; } @@ -329,11 +327,13 @@ bool MemoryMappedFile::Initialize(base::PlatformFile file) { return true; } -bool MemoryMappedFile::Initialize(const FilePath& file_name) { +bool MemoryMappedFile::Initialize(base::PlatformFile file) { if (IsValid()) return false; - if (!MapFileToMemory(file_name)) { + file_ = file; + + if (!MapFileToMemoryInternal()) { CloseHandles(); return false; } @@ -341,6 +341,10 @@ bool MemoryMappedFile::Initialize(const FilePath& file_name) { return true; } +bool MemoryMappedFile::IsValid() { + return data_ != NULL; +} + bool MemoryMappedFile::MapFileToMemory(const FilePath& file_name) { file_ = base::CreatePlatformFile( file_name, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, @@ -354,10 +358,6 @@ bool MemoryMappedFile::MapFileToMemory(const FilePath& file_name) { return MapFileToMemoryInternal(); } -bool MemoryMappedFile::IsValid() { - return data_ != NULL; -} - // Deprecated functions ---------------------------------------------------- #if defined(OS_WIN) -- cgit v1.1