Chromium Code Reviews| Index: net/url_request/url_fetcher_core.cc |
| diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc |
| index d83f52f2ccbc15532d8c314e0142176ba4901b52..2337cb5b4256703b7d7a6abf489151561e6da8ed 100644 |
| --- a/net/url_request/url_fetcher_core.cc |
| +++ b/net/url_request/url_fetcher_core.cc |
| @@ -477,6 +477,7 @@ void URLFetcherCore::OnReadCompleted(URLRequest* request, |
| // No more data to write. |
| const int result = response_writer_->Finish( |
| + bytes_read > 0 ? OK : bytes_read, |
|
mmenke
2016/10/18 20:20:01
Hrm...I'd normally ask for an integration test tha
xunjieli
2016/10/18 21:18:07
I see. So in the future URLRequest::Delegate::OnRe
mmenke
2016/10/18 21:40:46
No, in the future, I want it not to call into the
xunjieli
2016/10/19 12:00:21
Acknowledged. Thanks for explaining!
|
| base::Bind(&URLFetcherCore::DidFinishWriting, this)); |
| if (result != ERR_IO_PENDING) |
| DidFinishWriting(result); |
| @@ -861,7 +862,7 @@ int URLFetcherCore::WriteBuffer(scoped_refptr<DrainableIOBuffer> data) { |
| void URLFetcherCore::DidWriteBuffer(scoped_refptr<DrainableIOBuffer> data, |
| int result) { |
| if (result < 0) { // Handle errors. |
| - response_writer_->Finish(base::Bind(&EmptyCompletionCallback)); |
| + response_writer_->Finish(result, base::Bind(&EmptyCompletionCallback)); |
| CancelRequestAndInformDelegate(result); |
| return; |
| } |