Dispatch the information as part of the completion status instead. https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit#
FYI: crbug.com/504237 "Implement Navigation Timing 2" will be touching nearby parts of the code in the near future. Design doc is at https://docs.google.com/document/d/1DskJn3cKo8RlHxAKJqOSwYlN5mGLOHf3uWo5lwrUWu0/edit
Thank you for the information. I cc-ed the owner of the issue.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e0d49be76df5f71f17cf8aaf77772f386e1edae3 commit e0d49be76df5f71f17cf8aaf77772f386e1edae3 Author: yhirano <yhirano@chromium.org> Date: Tue Nov 22 02:09:07 2016 Rename ResourceResponse::addToEncodedDataSize() to setEncodedDataSize() ResourceResponse::addToEncodedDataSize is used only on a ResourceResponse whose encodedDataLength is 0. I'm planning to update the value at the response completion timing and setEncodedDataSize is easier to use / understand. BUG= 666216 Review-Url: https://codereview.chromium.org/2521503002 Cr-Commit-Position: refs/heads/master@{#433742} [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/content/child/web_url_loader_impl.cc [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/third_party/WebKit/Source/platform/network/ResourceResponse.cpp [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/third_party/WebKit/Source/platform/network/ResourceResponse.h [modify] https://crrev.com/e0d49be76df5f71f17cf8aaf77772f386e1edae3/third_party/WebKit/public/platform/WebURLResponse.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1033246a67ce26d0150242a071e61330be318433 commit 1033246a67ce26d0150242a071e61330be318433 Author: yhirano <yhirano@chromium.org> Date: Tue Nov 22 23:59:06 2016 Send encoded_body_length to renderer when response completed (1/3) Currently, "encoded_body_length" is dispatched on each ResourceMsg_DataReceived IPC message. With this series of CLs, it will be dispatched when a resource loading is completed. This is needed to use mojo data pipe for transferring the response body. - 1/3: https://codereview.chromium.org/2514713002/ - 2/3: https://codereview.chromium.org/2510333002/ - 3/3: https://codereview.chromium.org/2506363005/ Design doc: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit# This CL adds "encoded_body_length" property to ResourceRequestCompletionStatus. This CL doesn't change the behavior. BUG= 666216 Review-Url: https://codereview.chromium.org/2514713002 Cr-Commit-Position: refs/heads/master@{#434032} [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/browser/loader/async_resource_handler.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/browser/loader/async_resource_handler_unittest.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/browser/loader/mojo_async_resource_handler.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/browser/loader/url_loader_factory_impl_unittest.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/common/resource_messages.h [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/content/common/resource_request_completion_status.h [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/net/test/url_request/url_request_failed_job.cc [modify] https://crrev.com/1033246a67ce26d0150242a071e61330be318433/net/test/url_request/url_request_failed_job.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b1bc4b42b14c2f238186b04920a504dc8bb41d2d commit b1bc4b42b14c2f238186b04920a504dc8bb41d2d Author: mariakhomenko <mariakhomenko@chromium.org> Date: Wed Nov 23 01:16:47 2016 Revert of Send encoded_body_length to renderer when response completed (1/3) (patchset #4 id:60001 of https://codereview.chromium.org/2514713002/ ) Reason for revert: I believe this change broke cronet tests: https://build.chromium.org/p/chromium.android/builders/Android%20Cronet%20Marshmallow%2064bit%20Perf/builds/3490 Original issue's description: > Send encoded_body_length to renderer when response completed (1/3) > > Currently, "encoded_body_length" is dispatched on each ResourceMsg_DataReceived > IPC message. With this series of CLs, it will be dispatched when a resource > loading is completed. This is needed to use mojo data pipe for transferring > the response body. > > - 1/3: https://codereview.chromium.org/2514713002/ > - 2/3: https://codereview.chromium.org/2510333002/ > - 3/3: https://codereview.chromium.org/2506363005/ > > Design doc: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit# > > This CL adds "encoded_body_length" property to ResourceRequestCompletionStatus. > This CL doesn't change the behavior. > > BUG= 666216 > > Committed: https://crrev.com/1033246a67ce26d0150242a071e61330be318433 > Cr-Commit-Position: refs/heads/master@{#434032} TBR=ricea@chromium.org,tzik@chromium.org,rdsmith@chromium.org,tsepez@chromium.org,yhirano@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 666216 Review-Url: https://codereview.chromium.org/2515383004 Cr-Commit-Position: refs/heads/master@{#434064} [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/browser/loader/async_resource_handler.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/browser/loader/async_resource_handler_unittest.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/browser/loader/mojo_async_resource_handler.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/browser/loader/url_loader_factory_impl_unittest.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/common/resource_messages.h [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/content/common/resource_request_completion_status.h [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/net/test/url_request/url_request_failed_job.cc [modify] https://crrev.com/b1bc4b42b14c2f238186b04920a504dc8bb41d2d/net/test/url_request/url_request_failed_job.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/efb9d78772531d0de6900f1f1a213f5cb8b5ebab commit efb9d78772531d0de6900f1f1a213f5cb8b5ebab Author: yhirano <yhirano@chromium.org> Date: Mon Nov 28 09:29:03 2016 Send encoded_body_length to renderer when response completed (1/3) Currently, "encoded_body_length" is dispatched on each ResourceMsg_DataReceived IPC message. With this series of CLs, it will be dispatched when a resource loading is completed. This is needed to use mojo data pipe for transferring the response body. - 1/3: https://codereview.chromium.org/2514713002/ - 2/3: https://codereview.chromium.org/2510333002/ - 3/3: https://codereview.chromium.org/2506363005/ Design doc: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit# This CL adds "encoded_body_length" property to ResourceRequestCompletionStatus. This CL doesn't change the behavior. BUG= 666216 Committed: https://crrev.com/1033246a67ce26d0150242a071e61330be318433 Cr-Commit-Position: refs/heads/master@{#434032} CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2514713002 Cr-Commit-Position: refs/heads/master@{#434624} [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/browser/loader/async_resource_handler.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/browser/loader/async_resource_handler_unittest.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/browser/loader/mojo_async_resource_handler.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/browser/loader/url_loader_factory_impl_unittest.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/common/resource_messages.h [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/content/common/resource_request_completion_status.h [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/net/test/url_request/url_request_failed_job.cc [modify] https://crrev.com/efb9d78772531d0de6900f1f1a213f5cb8b5ebab/net/test/url_request/url_request_failed_job.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b82cdb024079a83c15b4c2c02ea28700ef6797cf commit b82cdb024079a83c15b4c2c02ea28700ef6797cf Author: yhirano <yhirano@chromium.org> Date: Mon Nov 28 14:17:42 2016 Send encoded_body_length to renderer when response completed (2/3) Currently, "encoded_body_length" is dispatched on each ResourceMsg_DataReceived IPC message. With this series of CLs, it will be dispatched when a resource loading is completed. This is needed to use mojo data pipe for transferring the response body. - 1/3: https://codereview.chromium.org/2514713002/ - 2/3: https://codereview.chromium.org/2510333002/ - 3/3: https://codereview.chromium.org/2506363005/ Design doc: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit# This CL - removes encoded_body_length() from RequestPeer::ReceivedData. - removes encodedBodyLength parameter from WebURLLoaderClient::didReceiveData, - adds totalEncodedBodyLength parameter to WebURLLoaderClient::didFinishLoading, - adds totalEncodedBodyLength parameter to WebURLLoaderClient::didFail. BUG= 666216 Review-Url: https://codereview.chromium.org/2510333002 Cr-Commit-Position: refs/heads/master@{#434654} [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/chrome/renderer/extensions/extension_localization_peer.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/chrome/renderer/extensions/extension_localization_peer.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/chrome/renderer/extensions/extension_localization_peer_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/chrome/renderer/security_filter_peer.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/chrome/renderer/security_filter_peer.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/ftp_directory_listing_response_delegate.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/resource_dispatcher.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/resource_dispatcher_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/shared_memory_data_consumer_handle.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/shared_memory_data_consumer_handle_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/shared_memory_received_data_factory.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/shared_memory_received_data_factory.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/shared_memory_received_data_factory_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/url_response_body_consumer.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/url_response_body_consumer_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/web_url_loader_impl.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/web_url_loader_impl.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/child/web_url_loader_impl_unittest.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/public/child/fixed_received_data.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/public/child/fixed_received_data.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/public/child/request_peer.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/content/renderer/fetchers/resource_fetcher_impl.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/core/fetch/ImageResource.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/core/fetch/ResourceLoader.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/core/loader/PingLoader.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/platform/exported/WebURLLoaderTestDelegate.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/platform/testing/weburl_loader_mock.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/web/tests/DocumentLoaderTest.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/web/tests/sim/SimNetwork.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/web/tests/sim/SimNetwork.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/Source/web/tests/sim/SimRequest.cpp [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/public/platform/WebURLLoader.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/public/platform/WebURLLoaderClient.h [modify] https://crrev.com/b82cdb024079a83c15b4c2c02ea28700ef6797cf/third_party/WebKit/public/platform/WebURLLoaderTestDelegate.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ce1c7996be64c3af7243256c5032f11aef6fe7cd commit ce1c7996be64c3af7243256c5032f11aef6fe7cd Author: yhirano <yhirano@chromium.org> Date: Mon Nov 28 17:58:35 2016 Send encoded_body_length to renderer when response completed (3/3) Currently, "encoded_body_length" is dispatched on each ResourceMsg_DataReceived IPC message. With this series of CLs, it will be dispatched when a resource loading is completed. This is needed to use mojo data pipe for transferring the response body. - 1/3: https://codereview.chromium.org/2514713002/ - 2/3: https://codereview.chromium.org/2510333002/ - 3/3: https://codereview.chromium.org/2506363005/ Design doc: https://docs.google.com/document/d/1Q-LpTPcV8QApeXSL24MVZHjP-uQK7RAK300t_qZaGFQ/edit# This CL drops encoded_body_length field from ResourceMsg_DataReceived and ResourceMsg_InlinedDataChunkReceived. This CL doesn't change the behavior. BUG= 666216 Review-Url: https://codereview.chromium.org/2506363005 Cr-Commit-Position: refs/heads/master@{#434684} [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/browser/loader/async_resource_handler.cc [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/browser/loader/async_resource_handler.h [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/browser/loader/async_resource_handler_unittest.cc [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/child/resource_dispatcher.cc [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/child/resource_dispatcher.h [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/child/resource_dispatcher_unittest.cc [modify] https://crrev.com/ce1c7996be64c3af7243256c5032f11aef6fe7cd/content/common/resource_messages.h
Apologies, applied the wrong component in bulk.
Comment 1 by yhirano@chromium.org
, Nov 17 2016