Chromium Code Reviews| Index: net/url_request/url_fetcher_response_writer.h |
| diff --git a/net/url_request/url_fetcher_response_writer.h b/net/url_request/url_fetcher_response_writer.h |
| index f739502b9c9eb93e8d6d90bb40a10008dd163878..b65e27c9d2c63707ed69b577313ea6ad49dc08ff 100644 |
| --- a/net/url_request/url_fetcher_response_writer.h |
| +++ b/net/url_request/url_fetcher_response_writer.h |
| @@ -45,9 +45,10 @@ class NET_EXPORT URLFetcherResponseWriter { |
| int num_bytes, |
| const CompletionCallback& callback) = 0; |
| - // Finishes writing. If ERR_IO_PENDING is returned, |callback| will be run |
| + // Finishes writing. If |net_error| is not OK, the writer might choose to skip |
| + // graceful shutdown. If ERR_IO_PENDING is returned, |callback| will be run |
|
mmenke
2016/10/19 14:32:29
Also, think we should be more explicit that if net
xunjieli
2016/10/19 15:19:28
Done.
|
| // later with the result. |
| - virtual int Finish(const CompletionCallback& callback) = 0; |
| + virtual int Finish(int net_error, const CompletionCallback& callback) = 0; |
| // Returns this instance's pointer as URLFetcherStringWriter when possible. |
| virtual URLFetcherStringWriter* AsStringWriter(); |
| @@ -69,7 +70,7 @@ class NET_EXPORT URLFetcherStringWriter : public URLFetcherResponseWriter { |
| int Write(IOBuffer* buffer, |
| int num_bytes, |
| const CompletionCallback& callback) override; |
| - int Finish(const CompletionCallback& callback) override; |
| + int Finish(int net_error, const CompletionCallback& callback) override; |
| URLFetcherStringWriter* AsStringWriter() override; |
| private: |
| @@ -95,7 +96,7 @@ class NET_EXPORT URLFetcherFileWriter : public URLFetcherResponseWriter { |
| int Write(IOBuffer* buffer, |
| int num_bytes, |
| const CompletionCallback& callback) override; |
| - int Finish(const CompletionCallback& callback) override; |
| + int Finish(int net_error, const CompletionCallback& callback) override; |
| URLFetcherFileWriter* AsFileWriter() override; |
| // Drops ownership of the file at |file_path_|. |