Chromium Code Reviews| Index: content/browser/download/download_file_impl.cc |
| diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc |
| index 13ce1604c49dba528a3f28329792b057b0ed7921..7ebbb4fea76f31caf6f0bb786d690e3b1779b1d8 100644 |
| --- a/content/browser/download/download_file_impl.cc |
| +++ b/content/browser/download/download_file_impl.cc |
| @@ -441,9 +441,16 @@ void DownloadFileImpl::StreamActive(SourceStream* source_stream) { |
| break; |
| case ByteStreamReader::STREAM_COMPLETE: |
| { |
| - reason = static_cast<DownloadInterruptReason>( |
| + reason = static_cast<DownloadInterruptReason>( |
| source_stream->stream_reader()->GetStatus()); |
| - SendUpdate(); |
| + if (source_stream->length() == DownloadSaveInfo::kLengthFullContent && |
| + reason == DownloadInterruptReason:: |
| + DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE) { |
|
xingliu
2017/05/10 01:40:17
Are errors for non-parallel download also affected
qinmin
2017/05/10 17:47:24
For non-parallel download, if we receive DOWNLOAD_
|
| + // We are probably reaching the end of the stream, don't treat this |
| + // as an error. |
| + reason = DOWNLOAD_INTERRUPT_REASON_NONE; |
| + } |
| + SendUpdate(); |
| } |
| break; |
| default: |