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

Side by Side Diff: net/disk_cache/storage_block.h

Issue 15032: Use appropriate version of delete in storage block... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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
« no previous file with comments | « no previous file | net/disk_cache/storage_block-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. 5 // See net/disk_cache/disk_cache.h for the public interface.
6 6
7 #ifndef NET_DISK_CACHE_STORAGE_BLOCK_H__ 7 #ifndef NET_DISK_CACHE_STORAGE_BLOCK_H__
8 #define NET_DISK_CACHE_STORAGE_BLOCK_H__ 8 #define NET_DISK_CACHE_STORAGE_BLOCK_H__
9 9
10 #include "net/disk_cache/addr.h" 10 #include "net/disk_cache/addr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool HasData() const; 56 bool HasData() const;
57 57
58 const Addr address() const; 58 const Addr address() const;
59 59
60 // Loads and store the data. 60 // Loads and store the data.
61 bool Load(); 61 bool Load();
62 bool Store(); 62 bool Store();
63 63
64 private: 64 private:
65 void AllocateData(); 65 void AllocateData();
66 void DeleteData();
66 67
67 T* data_; 68 T* data_;
68 MappedFile* file_; 69 MappedFile* file_;
69 Addr address_; 70 Addr address_;
70 bool modified_; 71 bool modified_;
71 bool own_data_; // Is data_ owned by this object or shared with someone else. 72 bool own_data_; // Is data_ owned by this object or shared with someone else.
72 bool extended_; // Used to store an entry of more than one block. 73 bool extended_; // Used to store an entry of more than one block.
73 74
74 DISALLOW_EVIL_CONSTRUCTORS(StorageBlock); 75 DISALLOW_EVIL_CONSTRUCTORS(StorageBlock);
75 }; 76 };
76 77
77 typedef StorageBlock<EntryStore> CacheEntryBlock; 78 typedef StorageBlock<EntryStore> CacheEntryBlock;
78 typedef StorageBlock<RankingsNode> CacheRankingsBlock; 79 typedef StorageBlock<RankingsNode> CacheRankingsBlock;
79 80
80 } // namespace disk_cache 81 } // namespace disk_cache
81 82
82 #endif // NET_DISK_CACHE_STORAGE_BLOCK_H__ 83 #endif // NET_DISK_CACHE_STORAGE_BLOCK_H__
83 84
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/storage_block-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698