diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 00:50:59 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 00:50:59 +0000 |
commit | eae9c0623d1800201739b4be146649103a45cd93 (patch) | |
tree | 2ce42f83e18d8a0a618ffd6dbe69b1acade5bda4 /base/file_util.cc | |
parent | 26f0821d0a34a79e551213d56054366aab6c70f7 (diff) | |
download | chromium_src-eae9c0623d1800201739b4be146649103a45cd93.zip chromium_src-eae9c0623d1800201739b4be146649103a45cd93.tar.gz chromium_src-eae9c0623d1800201739b4be146649103a45cd93.tar.bz2 |
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
Diffstat (limited to 'base/file_util.cc')
-rw-r--r-- | base/file_util.cc | 20 |
1 files changed, 10 insertions, 10 deletions
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) |