Chromium Code Reviews| Index: storage/browser/blob/blob_data_item.h |
| diff --git a/storage/browser/blob/blob_data_item.h b/storage/browser/blob/blob_data_item.h |
| index a711a4caf3b3fe4bc969be9e63c87bb33aa79834..579fe300768dbcfa6a9ad38b0eaea5171951b7c3 100644 |
| --- a/storage/browser/blob/blob_data_item.h |
| +++ b/storage/browser/blob/blob_data_item.h |
| @@ -22,6 +22,7 @@ class Entry; |
| namespace storage { |
| class BlobDataBuilder; |
| class BlobStorageContext; |
| +class DataElement; |
|
pwnall
2016/09/21 09:03:35
Does this forward declaration mean you don't need
dmurph
2016/09/21 23:45:52
Done.
|
| // Ref counted blob item. This class owns the backing data of the blob item. The |
| // backing data is immutable, and cannot change after creation. The purpose of |
| @@ -43,6 +44,15 @@ class STORAGE_EXPORT BlobDataItem : public base::RefCounted<BlobDataItem> { |
| friend class base::RefCounted<DataHandle>; |
| }; |
| + explicit BlobDataItem(std::unique_ptr<DataElement> item); |
| + BlobDataItem(std::unique_ptr<DataElement> item, |
| + const scoped_refptr<DataHandle>& data_handle); |
| + BlobDataItem(std::unique_ptr<DataElement> item, |
| + const scoped_refptr<DataHandle>& data_handle, |
| + disk_cache::Entry* entry, |
| + int disk_cache_stream_index, |
| + int disk_cache_side_stream_index); |
| + |
| DataElement::Type type() const { return item_->type(); } |
| const char* bytes() const { return item_->bytes(); } |
| const base::FilePath& path() const { return item_->path(); } |
| @@ -63,20 +73,16 @@ class STORAGE_EXPORT BlobDataItem : public base::RefCounted<BlobDataItem> { |
| return disk_cache_side_stream_index_; |
| } |
| + const scoped_refptr<DataHandle>& data_handle() const { return data_handle_; } |
| + |
| private: |
| friend class BlobDataBuilder; |
| + // friend class BlobMemoryController; |
|
pwnall
2016/09/21 09:03:35
Is this on purpose? Did you mean to leave this fri
dmurph
2016/09/21 23:45:52
removed.
|
| friend class BlobStorageContext; |
| + friend struct BlobSlice; |
| friend class base::RefCounted<BlobDataItem>; |
| friend STORAGE_EXPORT void PrintTo(const BlobDataItem& x, ::std::ostream* os); |
| - explicit BlobDataItem(std::unique_ptr<DataElement> item); |
| - BlobDataItem(std::unique_ptr<DataElement> item, |
| - const scoped_refptr<DataHandle>& data_handle); |
| - BlobDataItem(std::unique_ptr<DataElement> item, |
| - const scoped_refptr<DataHandle>& data_handle, |
| - disk_cache::Entry* entry, |
| - int disk_cache_stream_index, |
| - int disk_cache_side_stream_index); |
| virtual ~BlobDataItem(); |
| std::unique_ptr<DataElement> item_; |