OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/pickle.h" | 16 #include "base/pickle.h" |
17 #include "base/port.h" | 17 #include "base/port.h" |
18 #include "net/base/net_export.h" | 18 #include "net/base/net_export.h" |
19 #include "net/disk_cache/simple/simple_index.h" | 19 #include "net/disk_cache/simple/simple_index.h" |
20 | 20 |
21 namespace base { | |
22 class TaskRunner; | |
23 } | |
24 | |
25 namespace disk_cache { | 21 namespace disk_cache { |
26 | 22 |
27 const uint64 kSimpleIndexMagicNumber = GG_UINT64_C(0x656e74657220796f); | 23 const uint64 kSimpleIndexMagicNumber = GG_UINT64_C(0x656e74657220796f); |
28 | 24 |
29 // Simple Index File format is a pickle serialized data of IndexMetadata and | 25 // Simple Index File format is a pickle serialized data of IndexMetadata and |
30 // EntryMetadata objects. The file format is as follows: one instance of | 26 // EntryMetadata objects. The file format is as follows: one instance of |
31 // serialized |IndexMetadata| followed serialized |EntryMetadata| entries | 27 // serialized |IndexMetadata| followed serialized |EntryMetadata| entries |
32 // repeated |number_of_entries| amount of times. To know more about the format, | 28 // repeated |number_of_entries| amount of times. To know more about the format, |
33 // see SimpleIndexFile::Serialize() and SeeSimpleIndexFile::LoadFromDisk() | 29 // see SimpleIndexFile::Serialize() and SeeSimpleIndexFile::LoadFromDisk() |
34 // methods. | 30 // methods. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 uint32 crc; | 79 uint32 crc; |
84 }; | 80 }; |
85 | 81 |
86 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile); | 82 DISALLOW_COPY_AND_ASSIGN(SimpleIndexFile); |
87 }; | 83 }; |
88 | 84 |
89 | 85 |
90 } // namespace disk_cache | 86 } // namespace disk_cache |
91 | 87 |
92 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ | 88 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_INDEX_FILE_H_ |
OLD | NEW |