diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 18:51:41 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 18:51:41 +0000 |
commit | 66f16b11638993ead4028e853d5565a74b9acba3 (patch) | |
tree | 2166dd5ebb9d17d32f7fdd984425e15d58c66f0c /net/disk_cache/storage_block-inl.h | |
parent | d861c764cf88c5d99327ef15bb603373186c5bda (diff) | |
download | chromium_src-66f16b11638993ead4028e853d5565a74b9acba3.zip chromium_src-66f16b11638993ead4028e853d5565a74b9acba3.tar.gz chromium_src-66f16b11638993ead4028e853d5565a74b9acba3.tar.bz2 |
Disk cache: Remove remaining uses of RankingsNode.pointer.
We now have a map of open entries so we don't need to
do a lookup through the rankings node anymore. This
simplifies the 64 bit version of the code.
BUG=17881
TEST=unittests
Review URL: http://codereview.chromium.org/159643
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/storage_block-inl.h')
-rw-r--r-- | net/disk_cache/storage_block-inl.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/net/disk_cache/storage_block-inl.h b/net/disk_cache/storage_block-inl.h index 909b717..5e026a7 100644 --- a/net/disk_cache/storage_block-inl.h +++ b/net/disk_cache/storage_block-inl.h @@ -72,10 +72,16 @@ template<typename T> void StorageBlock<T>::Discard() { DeleteData(); data_ = NULL; modified_ = false; - own_data_ = false; extended_ = false; } +template<typename T> void StorageBlock<T>::StopSharingData() { + if (!data_ || own_data_) + return; + DCHECK(!modified_); + data_ = NULL; +} + template<typename T> void StorageBlock<T>::set_modified() { DCHECK(data_); modified_ = true; @@ -91,6 +97,10 @@ template<typename T> bool StorageBlock<T>::HasData() const { return (NULL != data_); } +template<typename T> bool StorageBlock<T>::own_data() const { + return own_data_; +} + template<typename T> const Addr StorageBlock<T>::address() const { return address_; } |