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

Unified Diff: Source/modules/websockets/MainThreadWebSocketChannel.cpp

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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: Source/modules/websockets/MainThreadWebSocketChannel.cpp
diff --git a/Source/modules/websockets/MainThreadWebSocketChannel.cpp b/Source/modules/websockets/MainThreadWebSocketChannel.cpp
index d0c4efaeb89ed71e26024551dba990b107458ae0..0b33141828316f6b3e902e5c21ca818150579856 100644
--- a/Source/modules/websockets/MainThreadWebSocketChannel.cpp
+++ b/Source/modules/websockets/MainThreadWebSocketChannel.cpp
@@ -160,9 +160,9 @@ WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const ArrayBuffer&
return WebSocketChannel::SendSuccess;
}
-WebSocketChannel::SendResult MainThreadWebSocketChannel::send(const Blob& binaryData)
+WebSocketChannel::SendResult MainThreadWebSocketChannel::send(PassRefPtr<BlobDataHandle> binaryData)
{
- LOG(Network, "MainThreadWebSocketChannel %p send() Sending Blob '%s'", this, binaryData.url().elidedString().utf8().data());
+ LOG(Network, "MainThreadWebSocketChannel %p send() Sending Blob '%s'", this, binaryData->uuid().utf8().data());
enqueueBlobFrame(WebSocketFrame::OpCodeBinary, binaryData);
processOutgoingFrameQueue();
return WebSocketChannel::SendSuccess;
@@ -708,13 +708,13 @@ void MainThreadWebSocketChannel::enqueueRawFrame(WebSocketFrame::OpCode opCode,
m_outgoingFrameQueue.append(frame.release());
}
-void MainThreadWebSocketChannel::enqueueBlobFrame(WebSocketFrame::OpCode opCode, const Blob& blob)
+void MainThreadWebSocketChannel::enqueueBlobFrame(WebSocketFrame::OpCode opCode, PassRefPtr<BlobDataHandle> blobData)
{
ASSERT(m_outgoingFrameQueueStatus == OutgoingFrameQueueOpen);
OwnPtr<QueuedFrame> frame = adoptPtr(new QueuedFrame);
frame->opCode = opCode;
frame->frameType = QueuedFrameTypeBlob;
- frame->blobData = Blob::create(blob.url(), blob.type(), blob.size());
+ frame->blobData = blobData;
m_outgoingFrameQueue.append(frame.release());
}
@@ -744,7 +744,7 @@ void MainThreadWebSocketChannel::processOutgoingFrameQueue()
ASSERT(!m_blobLoader);
m_blobLoader = adoptPtr(new FileReaderLoader(FileReaderLoader::ReadAsArrayBuffer, this));
m_blobLoaderStatus = BlobLoaderStarted;
- m_blobLoader->start(m_document, *frame->blobData);
+ m_blobLoader->start(m_document, frame->blobData);
m_outgoingFrameQueue.prepend(frame.release());
return;
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.h ('k') | Source/modules/websockets/NewWebSocketChannelImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698