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

Unified Diff: net/disk_cache/storage_block-inl.h

Issue 159643: Disk cache: Remove remaining uses of RankingsNode.pointer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/storage_block-inl.h
===================================================================
--- net/disk_cache/storage_block-inl.h (revision 21923)
+++ net/disk_cache/storage_block-inl.h (working copy)
@@ -72,10 +72,16 @@
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 @@
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_;
}

Powered by Google App Engine
This is Rietveld 408576698