| Index: storage/browser/blob/blob_storage_registry.cc
|
| diff --git a/storage/browser/blob/blob_storage_registry.cc b/storage/browser/blob/blob_storage_registry.cc
|
| index a0f03b25fd42a73fbd3cff7e6358c33992c27243..080bfbd3ae4a61c4e2ba99efd55127dc282b0a6f 100644
|
| --- a/storage/browser/blob/blob_storage_registry.cc
|
| +++ b/storage/browser/blob/blob_storage_registry.cc
|
| @@ -14,10 +14,11 @@
|
| #include "base/logging.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/stl_util.h"
|
| +#include "storage/browser/blob/blob_data_handle.h"
|
| +#include "storage/browser/blob/shareable_blob_data_item.h"
|
| #include "url/gurl.h"
|
|
|
| namespace storage {
|
| -using BlobState = BlobStorageRegistry::BlobState;
|
|
|
| namespace {
|
| // We can't use GURL directly for these hash fragment manipulations
|
| @@ -38,18 +39,22 @@ GURL ClearBlobUrlRef(const GURL& url) {
|
|
|
| } // namespace
|
|
|
| -BlobStorageRegistry::Entry::Entry(int refcount, BlobState state)
|
| - : refcount(refcount), state(state) {}
|
| +BlobStorageRegistry::ItemCopyEntry::ItemCopyEntry(
|
| + scoped_refptr<ShareableBlobDataItem> source_item,
|
| + size_t source_item_offset,
|
| + scoped_refptr<ShareableBlobDataItem> dest_item)
|
| + : source_item(std::move(source_item)),
|
| + source_item_offset(source_item_offset),
|
| + dest_item(std::move(dest_item)) {}
|
|
|
| -BlobStorageRegistry::Entry::~Entry() {}
|
| +BlobStorageRegistry::ItemCopyEntry::ItemCopyEntry(const ItemCopyEntry&) =
|
| + default;
|
|
|
| -bool BlobStorageRegistry::Entry::TestAndSetState(BlobState expected,
|
| - BlobState set) {
|
| - if (state != expected)
|
| - return false;
|
| - state = set;
|
| - return true;
|
| -}
|
| +BlobStorageRegistry::ItemCopyEntry::~ItemCopyEntry() {}
|
| +
|
| +BlobStorageRegistry::Entry::Entry() {}
|
| +
|
| +BlobStorageRegistry::Entry::~Entry() {}
|
|
|
| BlobStorageRegistry::BlobStorageRegistry() {}
|
|
|
| @@ -64,7 +69,7 @@ BlobStorageRegistry::Entry* BlobStorageRegistry::CreateEntry(
|
| const std::string& content_type,
|
| const std::string& content_disposition) {
|
| DCHECK(!ContainsKey(blob_map_, uuid));
|
| - std::unique_ptr<Entry> entry(new Entry(1, BlobState::PENDING));
|
| + std::unique_ptr<Entry> entry(new Entry());
|
| entry->content_type = content_type;
|
| entry->content_disposition = content_disposition;
|
| Entry* entry_ptr = entry.get();
|
|
|