Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Unified Diff: content/common/url_loader.mojom

Issue 2566943002: Dispatch transfer size update notification on mojo-loading (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/url_loader.mojom
diff --git a/content/common/url_loader.mojom b/content/common/url_loader.mojom
index f77988b238bd2d74a1d6a29e8b682de11ce9bec8..c0e63c873419c25b33fd0d8f0279e59503ee43e2 100644
--- a/content/common/url_loader.mojom
+++ b/content/common/url_loader.mojom
@@ -44,8 +44,21 @@ interface URLLoaderClient {
// Called when some data from a resource request has been downloaded to the
// file. This is only called in the 'download_to_file' case and replaces
// OnStartLoadingResponseBody in the call sequence in that case.
+ // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated
+ // instead.
OnDataDownloaded(int64 data_length, int64 encoded_length);
+ // Called when the transfer size is updated. This is only called if
+ // |report_raw_headers| is set and |download_to_file| is unset in the request.
+ // The transfer size is the length of the response (including both headers
+ // and the body) over the network. |transfer_size_diff| is the difference from
+ // the value previously reported one (including the one in OnReceiveResponse
+ // and OnReceiveRedirect). It must be positive.
+ // TODO(yhirano): Dispatch this notification even when |download_to_file| is
+ // set.
+ // TODO(yhirano): Consider using an unsigned type.
+ OnTransferSizeUpdated(int32 transfer_size_diff);
+
// Called when the loader starts loading response body.
OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698