Index: net/disk_cache/file_posix.cc |
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc |
index 01dafd3c10d4f038c1f8c9d49d4d27d8c33f86d6..740d10890db745b42ae624d97f207de3cf843360 100644 |
--- a/net/disk_cache/file_posix.cc |
+++ b/net/disk_cache/file_posix.cc |
@@ -189,11 +189,6 @@ bool File::Init(const FilePath& name) { |
return true; |
} |
-File::~File() { |
- if (platform_file_) |
- close(platform_file_); |
-} |
- |
base::PlatformFile File::platform_file() const { |
return platform_file_; |
} |
@@ -255,19 +250,6 @@ bool File::Write(const void* buffer, size_t buffer_len, size_t offset, |
return AsyncWrite(buffer, buffer_len, offset, callback, completed); |
} |
-bool File::AsyncWrite(const void* buffer, size_t buffer_len, size_t offset, |
- FileIOCallback* callback, bool* completed) { |
- DCHECK(init_); |
- if (buffer_len > ULONG_MAX || offset > ULONG_MAX) |
- return false; |
- |
- GetFileInFlightIO()->PostWrite(this, buffer, buffer_len, offset, callback); |
- |
- if (completed) |
- *completed = false; |
- return true; |
-} |
- |
bool File::SetLength(size_t length) { |
DCHECK(init_); |
if (length > ULONG_MAX) |
@@ -290,4 +272,22 @@ void File::WaitForPendingIO(int* num_pending_io) { |
DeleteFileInFlightIO(); |
} |
+File::~File() { |
+ if (platform_file_) |
+ close(platform_file_); |
+} |
+ |
+bool File::AsyncWrite(const void* buffer, size_t buffer_len, size_t offset, |
+ FileIOCallback* callback, bool* completed) { |
+ DCHECK(init_); |
+ if (buffer_len > ULONG_MAX || offset > ULONG_MAX) |
+ return false; |
+ |
+ GetFileInFlightIO()->PostWrite(this, buffer, buffer_len, offset, callback); |
+ |
+ if (completed) |
+ *completed = false; |
+ return true; |
+} |
+ |
} // namespace disk_cache |