| 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 8ee624f7cec39f83b0e09880fbbe0fdd542c9b1a..e89fab40da5fb83901eeff27239d964cb80c0fb0 100644
|
| --- a/storage/browser/blob/blob_storage_registry.cc
|
| +++ b/storage/browser/blob/blob_storage_registry.cc
|
| @@ -37,7 +37,7 @@ GURL ClearBlobUrlRef(const GURL& url) {
|
| } // namespace
|
|
|
| BlobStorageRegistry::Entry::Entry(int refcount, BlobState state)
|
| - : refcount(refcount), state(state), exceeded_memory(false) {}
|
| + : refcount(refcount), state(state) {}
|
|
|
| BlobStorageRegistry::Entry::~Entry() {}
|
|
|
| @@ -60,7 +60,7 @@ BlobStorageRegistry::~BlobStorageRegistry() {
|
| BlobStorageRegistry::Entry* BlobStorageRegistry::CreateEntry(
|
| const std::string& uuid) {
|
| DCHECK(!ContainsKey(blob_map_, uuid));
|
| - Entry* entry = new Entry(1, BlobState::RESERVED);
|
| + Entry* entry = new Entry(1, BlobState::PENDING);
|
| blob_map_.add(uuid, make_scoped_ptr(entry));
|
| return entry;
|
| }
|
| @@ -69,6 +69,10 @@ bool BlobStorageRegistry::DeleteEntry(const std::string& uuid) {
|
| return blob_map_.erase(uuid) == 1;
|
| }
|
|
|
| +bool BlobStorageRegistry::HasEntry(const std::string& uuid) const {
|
| + return blob_map_.find(uuid) != blob_map_.end();
|
| +}
|
| +
|
| BlobStorageRegistry::Entry* BlobStorageRegistry::GetEntry(
|
| const std::string& uuid) {
|
| BlobMap::iterator found = blob_map_.find(uuid);
|
| @@ -77,6 +81,11 @@ BlobStorageRegistry::Entry* BlobStorageRegistry::GetEntry(
|
| return found->second;
|
| }
|
|
|
| +const BlobStorageRegistry::Entry* BlobStorageRegistry::GetEntry(
|
| + const std::string& uuid) const {
|
| + return const_cast<BlobStorageRegistry*>(this)->GetEntry(uuid);
|
| +}
|
| +
|
| bool BlobStorageRegistry::CreateUrlMapping(const GURL& blob_url,
|
| const std::string& uuid) {
|
| DCHECK(!BlobUrlHasRef(blob_url));
|
|
|