| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // See net/disk_cache/disk_cache.h for the public interface of the cache. | 5 // See net/disk_cache/disk_cache.h for the public interface of the cache. |
| 6 | 6 |
| 7 #ifndef NET_DISK_CACHE_MAPPED_FILE_H_ | 7 #ifndef NET_DISK_CACHE_MAPPED_FILE_H_ |
| 8 #define NET_DISK_CACHE_MAPPED_FILE_H_ | 8 #define NET_DISK_CACHE_MAPPED_FILE_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/ref_counted.h" | |
| 13 #include "net/disk_cache/disk_format.h" | 12 #include "net/disk_cache/disk_format.h" |
| 14 #include "net/disk_cache/file.h" | 13 #include "net/disk_cache/file.h" |
| 15 #include "net/disk_cache/file_block.h" | 14 #include "net/disk_cache/file_block.h" |
| 16 | 15 |
| 17 namespace disk_cache { | 16 namespace disk_cache { |
| 18 | 17 |
| 19 // This class implements a memory mapped file used to access block-files. The | 18 // This class implements a memory mapped file used to access block-files. The |
| 20 // idea is that the header and bitmap will be memory mapped all the time, and | 19 // idea is that the header and bitmap will be memory mapped all the time, and |
| 21 // the actual data for the blocks will be access asynchronously (most of the | 20 // the actual data for the blocks will be access asynchronously (most of the |
| 22 // time). | 21 // time). |
| (...skipping 24 matching lines...) Expand all Loading... |
| 47 #endif | 46 #endif |
| 48 void* buffer_; // Address of the memory mapped buffer. | 47 void* buffer_; // Address of the memory mapped buffer. |
| 49 size_t view_size_; // Size of the memory pointed by buffer_. | 48 size_t view_size_; // Size of the memory pointed by buffer_. |
| 50 | 49 |
| 51 DISALLOW_COPY_AND_ASSIGN(MappedFile); | 50 DISALLOW_COPY_AND_ASSIGN(MappedFile); |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 } // namespace disk_cache | 53 } // namespace disk_cache |
| 55 | 54 |
| 56 #endif // NET_DISK_CACHE_MAPPED_FILE_H_ | 55 #endif // NET_DISK_CACHE_MAPPED_FILE_H_ |
| OLD | NEW |