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

Unified Diff: third_party/WebKit/Source/core/fileapi/File.cpp

Issue 1609313002: Use BlobCallback in toBlob instead of FileCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase master and Renamed mimeType to contentType to match other bits in Blob.h Created 4 years, 11 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
Index: third_party/WebKit/Source/core/fileapi/File.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/File.cpp b/third_party/WebKit/Source/core/fileapi/File.cpp
index 341bba79ed5ee862a2480b90e9355052be76cfde..2eefeace28cbe64eb8e3c7d4e238bbde15e8b7a6 100644
--- a/third_party/WebKit/Source/core/fileapi/File.cpp
+++ b/third_party/WebKit/Source/core/fileapi/File.cpp
@@ -112,19 +112,6 @@ File* File::create(const HeapVector<BlobOrStringOrArrayBufferViewOrArrayBuffer>&
return File::create(fileName, lastModified, BlobDataHandle::create(blobData.release(), fileSize));
}
-File* File::create(const unsigned char* data, size_t bytes, const String& mimeType)
-{
- ASSERT(data);
-
- OwnPtr<BlobData> blobData = BlobData::create();
- blobData->setContentType(mimeType);
- blobData->appendBytes(data, bytes);
- long long blobSize = blobData->length();
-
- // create blob as the type of file with two additional attributes -- name and lastModificationTime
- return File::create("", currentTimeMS(), BlobDataHandle::create(blobData.release(), blobSize));
-}
-
File* File::createWithRelativePath(const String& path, const String& relativePath)
{
File* file = new File(path, File::AllContentTypes, File::IsUserVisible);
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/File.h ('k') | third_party/WebKit/Source/core/fileapi/FileCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698