Index: storage/browser/blob/shareable_blob_data_item.cc |
diff --git a/storage/browser/blob/shareable_blob_data_item.cc b/storage/browser/blob/shareable_blob_data_item.cc |
index 40aaf9c7e10d29d40acbc73798f67f6c16030b4d..2de6f8dd3895237fa108f15b139da02d4f6e8e73 100644 |
--- a/storage/browser/blob/shareable_blob_data_item.cc |
+++ b/storage/browser/blob/shareable_blob_data_item.cc |
@@ -7,13 +7,18 @@ |
#include "storage/browser/blob/blob_data_item.h" |
namespace storage { |
+namespace { |
-ShareableBlobDataItem::ShareableBlobDataItem( |
- const std::string& blob_uuid, |
- const scoped_refptr<BlobDataItem>& item) |
- : item_(item) { |
+uint64_t GetAndIncrementItemId() { |
+ static uint64_t sNextItemId = 0; |
+ return sNextItemId++; |
+} |
+ |
+} // namespace |
+ |
+ShareableBlobDataItem::ShareableBlobDataItem(scoped_refptr<BlobDataItem> item) |
+ : item_id_(GetAndIncrementItemId()), item_(std::move(item)) { |
DCHECK_NE(item_->type(), DataElement::TYPE_BLOB); |
- referencing_blobs_.insert(blob_uuid); |
} |
ShareableBlobDataItem::~ShareableBlobDataItem() { |