Chromium Code Reviews| Index: content/child/resource_dispatcher.cc |
| diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc |
| index bdabb9f8a05407a1f4f7d43f6e3d2f171d3f0cd3..0c6b0b846c03c17df9f405d7c9770b540762a044 100644 |
| --- a/content/child/resource_dispatcher.cc |
| +++ b/content/child/resource_dispatcher.cc |
| @@ -114,6 +114,14 @@ class URLLoaderClientImpl final : public mojom::URLLoaderClient { |
| ResourceMsg_DataDownloaded(request_id_, data_len, encoded_data_len)); |
| } |
| + void OnUploadProgress(int64_t current_position, |
| + int64_t total_size, |
| + const base::Closure& ack_callback) override { |
| + resource_dispatcher_->OnMessageReceived( |
| + ResourceMsg_UploadProgress(request_id_, current_position, total_size)); |
| + ack_callback.Run(); |
| + } |
| + |
| void OnStartLoadingResponseBody( |
| mojo::ScopedDataPipeConsumerHandle body) override { |
| DCHECK(!body_consumer_); |
| @@ -230,8 +238,10 @@ void ResourceDispatcher::OnUploadProgress(int request_id, |
| request_info->peer->OnUploadProgress(position, size); |
| - // Acknowledge receipt |
| - message_sender_->Send(new ResourceHostMsg_UploadProgress_ACK(request_id)); |
| + if (!request_info->url_loader) { |
|
yhirano
2016/12/16 08:47:56
Please leave some comments here.
tzik
2017/01/05 05:14:33
Done.
|
| + // Acknowledge receipt |
| + message_sender_->Send(new ResourceHostMsg_UploadProgress_ACK(request_id)); |
| + } |
| } |
| void ResourceDispatcher::OnReceivedResponse( |