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

Unified Diff: third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp

Issue 2356693002: Remove BytesConsumer::read (Closed)
Patch Set: fix Created 4 years, 3 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/modules/fetch/BytesConsumer.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
index 5c4eedf7919ee8e2443ef650b2c5b3a92e9c0a75..f1584d0c76b0207a86630cf5082dd757e4ad425e 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
@@ -313,22 +313,6 @@ private:
} // namespace
-BytesConsumer::Result BytesConsumer::read(char* buffer, size_t size, size_t* readSize)
-{
- *readSize = 0;
- const char* src = nullptr;
- size_t available;
- Result r = beginRead(&src, &available);
- if (r != Result::Ok)
- return r;
- *readSize = std::min(available, size);
- memcpy(buffer, src, *readSize);
- auto result = endRead(*readSize);
- if (result != BytesConsumer::Result::Ok)
- *readSize = 0;
- return result;
-}
-
void BytesConsumer::tee(ExecutionContext* executionContext, BytesConsumer* src, BytesConsumer** dest1, BytesConsumer** dest2)
{
RefPtr<BlobDataHandle> blobDataHandle = src->drainAsBlobDataHandle(BlobSizePolicy::AllowBlobWithInvalidSize);

Powered by Google App Engine
This is Rietveld 408576698