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

Side by Side Diff: net/disk_cache/mapped_file.cc

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios breakage Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/mapped_file.h ('k') | net/disk_cache/mapped_file_avoid_mmap_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/disk_cache/mapped_file.h"
6
7 namespace disk_cache {
8
9 // Note: Most of this class is implemented in platform-specific files.
10
11 bool MappedFile::Load(const FileBlock* block) {
12 size_t offset = block->offset() + view_size_;
13 return Read(block->buffer(), block->size(), offset);
14 }
15
16 bool MappedFile::Store(const FileBlock* block) {
17 size_t offset = block->offset() + view_size_;
18 return Write(block->buffer(), block->size(), offset);
19 }
20
21 bool MappedFile::Load(const FileBlock* block,
22 FileIOCallback* callback,
23 bool* completed) {
24 size_t offset = block->offset() + view_size_;
25 return Read(block->buffer(), block->size(), offset, callback, completed);
26 }
27
28 bool MappedFile::Store(const FileBlock* block,
29 FileIOCallback* callback,
30 bool* completed) {
31 size_t offset = block->offset() + view_size_;
32 return Write(block->buffer(), block->size(), offset, callback, completed);
33 }
34
35 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/mapped_file.h ('k') | net/disk_cache/mapped_file_avoid_mmap_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698