Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: Source/core/dom/DOMURL.cpp

Issue 157363003: Implement Blob.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/DOMURL.h ('k') | Source/core/fileapi/Blob.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMURL.cpp
diff --git a/Source/core/dom/DOMURL.cpp b/Source/core/dom/DOMURL.cpp
index 2e58dba87e477105c029e2667d54c169a0cba711..e2e5473d3b8d24c7662bdbde3252f44b99f17b7a 100644
--- a/Source/core/dom/DOMURL.cpp
+++ b/Source/core/dom/DOMURL.cpp
@@ -69,16 +69,16 @@ String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob)
{
if (!executionContext || !blob)
return String();
- return createPublicURL(executionContext, blob);
+ return createPublicURL(executionContext, blob, blob->uuid());
}
-String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrable* registrable)
+String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrable* registrable, const String& uuid)
{
KURL publicURL = BlobURL::createPublicURL(executionContext->securityOrigin());
if (publicURL.isEmpty())
return String();
- executionContext->publicURLManager().registerURL(executionContext->securityOrigin(), publicURL, registrable);
+ executionContext->publicURLManager().registerURL(executionContext->securityOrigin(), publicURL, registrable, uuid);
return publicURL.string();
}
@@ -93,4 +93,12 @@ void DOMURL::revokeObjectURL(ExecutionContext* executionContext, const String& u
executionContext->publicURLManager().revoke(url);
}
+void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& uuid)
+{
+ if (!executionContext)
+ return;
+
+ executionContext->publicURLManager().revoke(uuid);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/dom/DOMURL.h ('k') | Source/core/fileapi/Blob.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698