| 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 #ifndef NET_DISK_CACHE_CACHE_INTERNAL_INL_H__ | 5 #ifndef NET_DISK_CACHE_CACHE_INTERNAL_INL_H_ |
| 6 #define NET_DISK_CACHE_CACHE_INTERNAL_INL_H__ | 6 #define NET_DISK_CACHE_CACHE_INTERNAL_INL_H_ |
| 7 | 7 |
| 8 #include "net/disk_cache/storage_block.h" | 8 #include "net/disk_cache/storage_block.h" |
| 9 | 9 |
| 10 #include "base/logging.h" |
| 10 #include "net/disk_cache/trace.h" | 11 #include "net/disk_cache/trace.h" |
| 11 | 12 |
| 12 namespace disk_cache { | 13 namespace disk_cache { |
| 13 | 14 |
| 14 template<typename T> StorageBlock<T>::StorageBlock(MappedFile* file, | 15 template<typename T> StorageBlock<T>::StorageBlock(MappedFile* file, |
| 15 Addr address) | 16 Addr address) |
| 16 : data_(NULL), file_(file), address_(address), modified_(false), | 17 : data_(NULL), file_(file), address_(address), modified_(false), |
| 17 own_data_(false), extended_(false) { | 18 own_data_(false), extended_(false) { |
| 18 if (address.num_blocks() > 1) | 19 if (address.num_blocks() > 1) |
| 19 extended_ = true; | 20 extended_ = true; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } else { | 126 } else { |
| 126 data_->~T(); | 127 data_->~T(); |
| 127 delete[] reinterpret_cast<char*>(data_); | 128 delete[] reinterpret_cast<char*>(data_); |
| 128 } | 129 } |
| 129 own_data_ = false; | 130 own_data_ = false; |
| 130 } | 131 } |
| 131 } | 132 } |
| 132 | 133 |
| 133 } // namespace disk_cache | 134 } // namespace disk_cache |
| 134 | 135 |
| 135 #endif // NET_DISK_CACHE_CACHE_INTERNAL_INL_H__ | 136 #endif // NET_DISK_CACHE_CACHE_INTERNAL_INL_H_ |
| 136 | |
| OLD | NEW |