Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: net/disk_cache/file_posix.cc

Issue 6339012: More net/ method ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More done while waiting for previous patch to clear Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/mapped_file_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/mapped_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698