Index: webkit/browser/blob/blob_storage_context.cc |
diff --git a/webkit/browser/blob/blob_storage_context.cc b/webkit/browser/blob/blob_storage_context.cc |
index 4a0260736a03251eb2a92b7ac1a307d202ba87c4..bc8fa64b2f2a498a2d54c3f3f787588b812eae14 100644 |
--- a/webkit/browser/blob/blob_storage_context.cc |
+++ b/webkit/browser/blob/blob_storage_context.cc |
@@ -94,6 +94,14 @@ scoped_ptr<BlobDataHandle> BlobStorageContext::AddFinishedBlob( |
return handle.Pass(); |
} |
+std::string BlobStorageContext::LookupUuidFromDeprecatedURL( |
+ const GURL& url) { |
+ BlobURLMap::const_iterator found = deprecated_blob_urls_.find(url); |
+ if (found == deprecated_blob_urls_.end()) |
+ return std::string(); |
+ return found->second; |
+} |
+ |
void BlobStorageContext::StartBuildingBlob(const std::string& uuid) { |
DCHECK(!IsInUse(uuid) && !uuid.empty()); |
blob_map_[uuid] = BlobMapEntry(1, BEING_BUILT, new BlobData(uuid)); |
@@ -222,6 +230,21 @@ void BlobStorageContext::RevokePublicBlobURL(const GURL& blob_url) { |
public_blob_urls_.erase(blob_url); |
} |
+void BlobStorageContext::DeprecatedRegisterPrivateBlobURL( |
+ const GURL& url, const std::string& uuid) { |
+ if (!IsInUse(uuid)) |
+ return; |
ericu
2013/08/21 23:26:09
Should this be an error or a DCHECK(false)?
michaeln
2013/08/27 23:24:06
Error checking/handling with the old BlobStorageCo
|
+ IncrementBlobRefCount(uuid); |
+ deprecated_blob_urls_[url] = uuid; |
+} |
+ |
+void BlobStorageContext::DeprecatedRevokePrivateBlobURL(const GURL& url) { |
+ if (deprecated_blob_urls_.find(url) == deprecated_blob_urls_.end()) |
ericu
2013/08/21 23:26:09
Same here?
|
+ return; |
+ DecrementBlobRefCount(deprecated_blob_urls_[url]); |
+ deprecated_blob_urls_.erase(url); |
+} |
+ |
bool BlobStorageContext::ExpandStorageItems( |
BlobData* target_blob_data, BlobData* src_blob_data, |
uint64 offset, uint64 length) { |