Index: net/filter/sdch_source_stream.cc |
diff --git a/net/filter/sdch_source_stream.cc b/net/filter/sdch_source_stream.cc |
index 954364e222e575bb9386a73b90500e4baee60997..8fb7d29d7dea40fff76cd6bc6c5746639805942b 100644 |
--- a/net/filter/sdch_source_stream.cc |
+++ b/net/filter/sdch_source_stream.cc |
@@ -142,18 +142,19 @@ int SdchSourceStream::FilterData(IOBuffer* output_buffer, |
break; |
} |
case STATE_PASS_THROUGH: { |
- if (buffered_output_.empty()) |
- break; |
- int flushed = FlushBufferedOutput(output_buffer->data() + bytes_out, |
- output_buffer_size - bytes_out, |
- buffered_output_); |
- buffered_output_.erase(0, flushed); |
- bytes_out += flushed; |
+ if (buffered_output_.empty()) { |
Randy Smith (Not in Mondays)
2016/10/23 01:32:07
Isn't this inverted? Don't you want to FlushBuffe
xunjieli
2016/10/24 11:58:58
Sorry, I tried to split the change off the switch-
|
+ int flushed = FlushBufferedOutput(output_buffer->data() + bytes_out, |
+ output_buffer_size - bytes_out, |
+ buffered_output_); |
+ buffered_output_.erase(0, flushed); |
+ bytes_out += flushed; |
+ } |
if (!buffered_output_.empty()) |
break; |
size_t to_copy = |
std::min(output_buffer_size - bytes_out, input_data_size); |
memcpy(output_buffer->data() + bytes_out, input_data, to_copy); |
+ bytes_out += to_copy; |
input_data += to_copy; |
input_data_size -= to_copy; |
break; |