Commit f3789e52 authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

Blob: Remove BlobReaderEagerCompletion feature.

Bug: 957175
Change-Id: I2b4fee145edc74bd9bba6afd2b3e66a0bd55b77a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1698127Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677069}
parent 9dff7c8c
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "storage/browser/blob/mojo_blob_reader.h" #include "storage/browser/blob/mojo_blob_reader.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/feature_list.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "services/network/public/cpp/net_adapters.h" #include "services/network/public/cpp/net_adapters.h"
...@@ -14,17 +13,6 @@ ...@@ -14,17 +13,6 @@
namespace storage { namespace storage {
namespace {
// This feature will eagerly complete reading when there are no more remaining
// bytes to be read. The default behavior is to trigger another read cycle to
// detect the condition which may be delayed depending on the capacity of the
// target mojo data pipe.
const base::Feature kBlobReaderEagerCompletion{
"BlobReaderEagerCompletion", base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace
// static // static
void MojoBlobReader::Create( void MojoBlobReader::Create(
const BlobDataHandle* handle, const BlobDataHandle* handle,
...@@ -251,9 +239,7 @@ void MojoBlobReader::DidRead(bool completed_synchronously, int num_bytes) { ...@@ -251,9 +239,7 @@ void MojoBlobReader::DidRead(bool completed_synchronously, int num_bytes) {
response_body_stream_ = pending_write_->Complete(num_bytes); response_body_stream_ = pending_write_->Complete(num_bytes);
total_written_bytes_ += num_bytes; total_written_bytes_ += num_bytes;
pending_write_ = nullptr; pending_write_ = nullptr;
if (num_bytes == 0 || if (num_bytes == 0 || blob_reader_->remaining_bytes() == 0) {
(base::FeatureList::IsEnabled(kBlobReaderEagerCompletion) &&
blob_reader_->remaining_bytes() == 0)) {
response_body_stream_.reset(); // This closes the data pipe. response_body_stream_.reset(); // This closes the data pipe.
NotifyCompletedAndDeleteIfNeeded(net::OK); NotifyCompletedAndDeleteIfNeeded(net::OK);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment