commit | 8d36e8296a5882ac323aa2e4ffb3704d438b3838 | [log] [tgz] |
---|---|---|
author | Antonio Gomes <tonikitoo@igalia.com> | Thu Aug 09 23:14:59 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 09 23:14:59 2018 |
tree | de338b790f860274f0a22a8bd54b3f47f973a89b | |
parent | bef3de4ccd2c52deb936d39dd3a31d86394c5906 [diff] |
s13n: Expose an API to get the total of decompressed bytes of a response body While migrating some classes from URLFetcher to SimpleURLLoader, it is useful to have the size of the resulting decompressed body. In case of DownloadToString* calls, this is straightfoward: the length to the string is the size. However, in the case of DownloadTo{Temp}File calls, where only the resulting file path is passed to the completion callback, having an API to get the decompressed body size is useful. It also avoids sync calls to access the file data. This CL adds a SimpleURLLoader::GetContentSize API that provides such value. When used with SimpleURLLloader::SetAllowPartialResults(true), the API returns the total decompressed body size even in the case of errors. BUG=773295,844972 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Ia8cdb3326b5d5c74276e384f966a7e98f61a8c46 Reviewed-on: https://chromium-review.googlesource.com/1167683 Reviewed-by: Matt Menke <mmenke@chromium.org> Commit-Queue: Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#581952}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .