From 66f16b11638993ead4028e853d5565a74b9acba3 Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 30 Jul 2009 18:51:41 +0000 Subject: 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 --- net/disk_cache/storage_block-inl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'net/disk_cache/storage_block-inl.h') 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 void StorageBlock::Discard() { DeleteData(); data_ = NULL; modified_ = false; - own_data_ = false; extended_ = false; } +template void StorageBlock::StopSharingData() { + if (!data_ || own_data_) + return; + DCHECK(!modified_); + data_ = NULL; +} + template void StorageBlock::set_modified() { DCHECK(data_); modified_ = true; @@ -91,6 +97,10 @@ template bool StorageBlock::HasData() const { return (NULL != data_); } +template bool StorageBlock::own_data() const { + return own_data_; +} + template const Addr StorageBlock::address() const { return address_; } -- cgit v1.1