| 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_SYNCHRONOUS_ENTRY_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ |
| 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 bool header_and_key_check_needed_[kSimpleEntryFileCount] = { | 373 bool header_and_key_check_needed_[kSimpleEntryFileCount] = { |
| 374 false, | 374 false, |
| 375 }; | 375 }; |
| 376 | 376 |
| 377 base::File files_[kSimpleEntryFileCount]; | 377 base::File files_[kSimpleEntryFileCount]; |
| 378 | 378 |
| 379 // True if the corresponding stream is empty and therefore no on-disk file | 379 // True if the corresponding stream is empty and therefore no on-disk file |
| 380 // was created to store it. | 380 // was created to store it. |
| 381 bool empty_file_omitted_[kSimpleEntryFileCount]; | 381 bool empty_file_omitted_[kSimpleEntryFileCount]; |
| 382 | 382 |
| 383 uint32_t stream1_crc32_; |
| 384 bool has_stream1_crc32_; |
| 385 bool read_stream1_crc32_; |
| 386 |
| 383 typedef std::map<int64_t, SparseRange> SparseRangeOffsetMap; | 387 typedef std::map<int64_t, SparseRange> SparseRangeOffsetMap; |
| 384 typedef SparseRangeOffsetMap::iterator SparseRangeIterator; | 388 typedef SparseRangeOffsetMap::iterator SparseRangeIterator; |
| 385 SparseRangeOffsetMap sparse_ranges_; | 389 SparseRangeOffsetMap sparse_ranges_; |
| 386 base::File sparse_file_; | 390 base::File sparse_file_; |
| 387 // Offset of the end of the sparse file (where the next sparse range will be | 391 // Offset of the end of the sparse file (where the next sparse range will be |
| 388 // written). | 392 // written). |
| 389 int64_t sparse_tail_offset_; | 393 int64_t sparse_tail_offset_; |
| 390 | 394 |
| 391 // True if the entry was created, or false if it was opened. Used to log | 395 // True if the entry was created, or false if it was opened. Used to log |
| 392 // SimpleCache.*.EntryCreatedWithStream2Omitted only for created entries. | 396 // SimpleCache.*.EntryCreatedWithStream2Omitted only for created entries. |
| 393 bool files_created_; | 397 bool files_created_; |
| 394 }; | 398 }; |
| 395 | 399 |
| 396 } // namespace disk_cache | 400 } // namespace disk_cache |
| 397 | 401 |
| 398 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ | 402 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_SYNCHRONOUS_ENTRY_H_ |
| OLD | NEW |