| Index: third_party/WebKit/Source/core/fileapi/Blob.cpp
|
| diff --git a/third_party/WebKit/Source/core/fileapi/Blob.cpp b/third_party/WebKit/Source/core/fileapi/Blob.cpp
|
| index adcbe8bbd06c90470673bc09b69ef8b66f5b6e23..d744a0057c355bb3639b447990eb77283a54b299 100644
|
| --- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
|
| +++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
|
| @@ -105,6 +105,18 @@ Blob* Blob::create(const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrString>&
|
| return new Blob(BlobDataHandle::create(blobData.release(), blobSize));
|
| }
|
|
|
| +Blob* Blob::create(const unsigned char* data, size_t bytes, const String& contentType)
|
| +{
|
| + ASSERT(data);
|
| +
|
| + OwnPtr<BlobData> blobData = BlobData::create();
|
| + blobData->setContentType(contentType);
|
| + blobData->appendBytes(data, bytes);
|
| + long long blobSize = blobData->length();
|
| +
|
| + return new Blob(BlobDataHandle::create(blobData.release(), blobSize));
|
| +}
|
| +
|
| void Blob::clampSliceOffsets(long long size, long long& start, long long& end)
|
| {
|
| ASSERT(size != -1);
|
|
|