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

Unified Diff: net/disk_cache/mapped_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/file_posix.cc ('k') | net/disk_cache/rankings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/mapped_file_posix.cc
diff --git a/net/disk_cache/mapped_file_posix.cc b/net/disk_cache/mapped_file_posix.cc
index f9a361b7ad5dd6ed8486cb08b0f53439d67363a9..9abfa5cdea34f32e50e9802176e02ab07d4aaa64 100644
--- a/net/disk_cache/mapped_file_posix.cc
+++ b/net/disk_cache/mapped_file_posix.cc
@@ -32,16 +32,6 @@ void* MappedFile::Init(const FilePath& name, size_t size) {
return buffer_;
}
-MappedFile::~MappedFile() {
- if (!init_)
- return;
-
- if (buffer_) {
- int ret = munmap(buffer_, view_size_);
- DCHECK(0 == ret);
- }
-}
-
bool MappedFile::Load(const FileBlock* block) {
size_t offset = block->offset() + view_size_;
return Read(block->buffer(), block->size(), offset);
@@ -52,4 +42,14 @@ bool MappedFile::Store(const FileBlock* block) {
return Write(block->buffer(), block->size(), offset);
}
+MappedFile::~MappedFile() {
+ if (!init_)
+ return;
+
+ if (buffer_) {
+ int ret = munmap(buffer_, view_size_);
+ DCHECK(0 == ret);
+ }
+}
+
} // namespace disk_cache
« no previous file with comments | « net/disk_cache/file_posix.cc ('k') | net/disk_cache/rankings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698