Ignore non-active fullscreen windows for shelf state.
[chromium-blink-merge.git] / net / disk_cache / mapped_file.cc
blobdd745ac5268439b1a91c23cd6e9a64d36e1c5042
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.
5 #include "net/disk_cache/mapped_file.h"
7 namespace disk_cache {
9 // Note: Most of this class is implemented in platform-specific files.
11 bool MappedFile::Load(const FileBlock* block) {
12 size_t offset = block->offset() + view_size_;
13 return Read(block->buffer(), block->size(), offset);
16 bool MappedFile::Store(const FileBlock* block) {
17 size_t offset = block->offset() + view_size_;
18 return Write(block->buffer(), block->size(), offset);
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);
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);
35 } // namespace disk_cache