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

Unified Diff: Source/modules/serviceworkers/BodyStreamBuffer.cpp

Issue 787793002: [ServiceWorker] Add contentType argument to BodyStreamBuffer::readAllAndCreateBlobHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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: Source/modules/serviceworkers/BodyStreamBuffer.cpp
diff --git a/Source/modules/serviceworkers/BodyStreamBuffer.cpp b/Source/modules/serviceworkers/BodyStreamBuffer.cpp
index 9f34fd495a6aca94af76df37ecddb52cdb439fee..d92a25b79d9307f451d274b8afe6792c4871ceca 100644
--- a/Source/modules/serviceworkers/BodyStreamBuffer.cpp
+++ b/Source/modules/serviceworkers/BodyStreamBuffer.cpp
@@ -13,11 +13,12 @@ namespace {
class BlobCreator final : public BodyStreamBuffer::Observer {
public:
- BlobCreator(BodyStreamBuffer* buffer, BodyStreamBuffer::BlobHandleCreatorClient* client)
+ BlobCreator(BodyStreamBuffer* buffer, const String& contentType, BodyStreamBuffer::BlobHandleCreatorClient* client)
: m_buffer(buffer)
, m_client(client)
, m_blobData(BlobData::create())
{
+ m_blobData->setContentType(contentType);
}
~BlobCreator() override { }
void trace(Visitor* visitor) override
@@ -108,11 +109,11 @@ void BodyStreamBuffer::error(PassRefPtrWillBeRawPtr<DOMException> exception)
m_observer->onError();
}
-bool BodyStreamBuffer::readAllAndCreateBlobHandle(BlobHandleCreatorClient* client)
+bool BodyStreamBuffer::readAllAndCreateBlobHandle(const String& contentType, BlobHandleCreatorClient* client)
{
if (m_observer)
return false;
- BlobCreator* blobCreator = new BlobCreator(this, client);
+ BlobCreator* blobCreator = new BlobCreator(this, contentType, client);
blobCreator->start();
return true;
}
« no previous file with comments | « Source/modules/serviceworkers/BodyStreamBuffer.h ('k') | Source/modules/serviceworkers/BodyStreamBufferTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698