Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: net/disk_cache/blockfile/storage_block-inl.h

Issue 121643003: Reorganize net/disk_cache into backend specific directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios breakage Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_STORAGE_BLOCK_INL_H_ 5 #ifndef NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
6 #define NET_DISK_CACHE_STORAGE_BLOCK_INL_H_ 6 #define NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
7 7
8 #include "net/disk_cache/storage_block.h" 8 #include "net/disk_cache/blockfile/storage_block.h"
9 9
10 #include "base/hash.h" 10 #include "base/hash.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "net/disk_cache/trace.h" 12 #include "net/disk_cache/blockfile/trace.h"
13 13
14 namespace disk_cache { 14 namespace disk_cache {
15 15
16 template<typename T> StorageBlock<T>::StorageBlock(MappedFile* file, 16 template<typename T> StorageBlock<T>::StorageBlock(MappedFile* file,
17 Addr address) 17 Addr address)
18 : data_(NULL), file_(file), address_(address), modified_(false), 18 : data_(NULL), file_(file), address_(address), modified_(false),
19 own_data_(false), extended_(false) { 19 own_data_(false), extended_(false) {
20 if (address.num_blocks() > 1) 20 if (address.num_blocks() > 1)
21 extended_ = true; 21 extended_ = true;
22 DCHECK(!address.is_initialized() || sizeof(*data_) == address.BlockSize()); 22 DCHECK(!address.is_initialized() || sizeof(*data_) == address.BlockSize());
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 own_data_ = false; 195 own_data_ = false;
196 } 196 }
197 } 197 }
198 198
199 template<typename T> uint32 StorageBlock<T>::CalculateHash() const { 199 template<typename T> uint32 StorageBlock<T>::CalculateHash() const {
200 return base::Hash(reinterpret_cast<char*>(data_), offsetof(T, self_hash)); 200 return base::Hash(reinterpret_cast<char*>(data_), offsetof(T, self_hash));
201 } 201 }
202 202
203 } // namespace disk_cache 203 } // namespace disk_cache
204 204
205 #endif // NET_DISK_CACHE_STORAGE_BLOCK_INL_H_ 205 #endif // NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/storage_block.h ('k') | net/disk_cache/blockfile/storage_block_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698