This is primarily required for background fetch where a request can also contain some upload data along with the download data. Upload data will typically be in the form of a blob.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/36073bb6237f44ed1e4084e76a152e960ca960cc commit 36073bb6237f44ed1e4084e76a152e960ca960cc Author: Shakti Sahu <shaktisahu@chromium.org> Date: Fri Feb 16 05:54:10 2018 Upload support in download manager DownloadManager today has some minimal support to upload a byte array. We are extending it to upload blobs in this CL. The client will embed the blob data inside the post body (ResourceRequestBody) of the DownloadUrlParameters which will be subsequently passed to the URLRequest/ResourceRequest. Bug: 812327 Change-Id: Ia230961294d3bdbcf6284fde0e078c5844a991bf Reviewed-on: https://chromium-review.googlesource.com/919622 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Commit-Queue: Shakti Sahu <shaktisahu@chromium.org> Cr-Commit-Position: refs/heads/master@{#537225} [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/chrome/browser/extensions/api/downloads/downloads_api.cc [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/components/download/public/common/BUILD.gn [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/components/download/public/common/DEPS [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/components/download/public/common/download_url_parameters.h [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/content/browser/download/download_browsertest.cc [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/content/browser/download/download_manager_impl.cc [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/content/browser/download/download_utils.cc [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/content/browser/download/download_utils.h [modify] https://crrev.com/36073bb6237f44ed1e4084e76a152e960ca960cc/content/browser/download/parallel_download_job.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7c7592057a715076a1a52bdce8f419a3da9db2c2 commit 7c7592057a715076a1a52bdce8f419a3da9db2c2 Author: Shakti Sahu <shaktisahu@chromium.org> Date: Thu Mar 15 18:03:52 2018 Download service : Upload support in client, driver and entries This CL adds support for upload in the download driver, model, client and entries. The upload logic and state machine changes in the controller will be added in another CL. Bug: 812327 Change-Id: Ib3b60e2ad71740a28b0aa53a08cce9b046ab6e9e Reviewed-on: https://chromium-review.googlesource.com/919867 Commit-Queue: Shakti Sahu <shaktisahu@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Reviewed-by: Daniel Murphy <dmurph@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Dmitry Titov <dimich@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Cr-Commit-Position: refs/heads/master@{#543441} [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/chrome/browser/background_fetch/background_fetch_download_client.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/chrome/browser/background_fetch/background_fetch_download_client.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/chrome/browser/offline_pages/prefetch/offline_prefetch_download_client.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/content/internal/download_driver_impl.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/content/internal/download_driver_impl.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/config.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/config.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/controller_impl.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/controller_impl_unittest.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/debugging_client.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/debugging_client.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/download_driver.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/entry.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/entry.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/in_memory_download_driver.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/in_memory_download_driver.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/in_memory_download_driver_unittest.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/proto/entry.proto [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/proto_conversions.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/test/BUILD.gn [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/test/test_download_driver.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/internal/background_service/test/test_download_driver.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/DEPS [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/client.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/test/BUILD.gn [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/test/empty_client.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/test/empty_client.h [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/test/mock_client.cc [modify] https://crrev.com/7c7592057a715076a1a52bdce8f419a3da9db2c2/components/download/public/background_service/test/mock_client.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cc3902db5587396f1fc804c21679e41e72842469 commit cc3902db5587396f1fc804c21679e41e72842469 Author: Shakti Sahu <shaktisahu@chromium.org> Date: Tue Mar 27 03:32:13 2018 Download service : Upload support in controller This CL builds on top of the previous CLs where upload support have been added in driver, client, model and entries. There are few changes in controller to enable upload : 1 - Tracking the entries for whom upload data have been requested but not received. A timeout task was scheduled at 30 seconds. 2 - No retry for failed entries having upload. After an interruption or browser restart, we should delete the entry right away. Bug: 812327 Change-Id: Id6ed456272c714af8c6b915e2491827e869d1110 Reviewed-on: https://chromium-review.googlesource.com/919495 Commit-Queue: Shakti Sahu <shaktisahu@chromium.org> Reviewed-by: Ilya Sherman <isherman@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#545974} [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/BUILD.gn [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/config.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/controller.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/controller_impl.cc [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/controller_impl.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/controller_impl_unittest.cc [add] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/download_blockage_status.cc [add] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/download_blockage_status.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/entry.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/stats.cc [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/internal/background_service/stats.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/components/download/public/background_service/client.h [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/tools/metrics/histograms/enums.xml [modify] https://crrev.com/cc3902db5587396f1fc804c21679e41e72842469/tools/metrics/histograms/histograms.xml
Comment 1 by bugdroid1@chromium.org
, Feb 16 2018