Add a method to the DownloadManagerDelegate to allow intercepting or blocking a download. This can be a synchronous call and will eventually replace the download throttle for offline pages.
+dimich@ and +chili@ for fyi.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8 commit cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8 Author: Shakti Sahu <shaktisahu@chromium.org> Date: Thu Feb 15 14:21:23 2018 Downloads : Added a delegate method for intercepting downloads This method will be useful for other systems that want to handle download themselves, especially offline pages, which can intercept the download here onwards based on mime_type. Bug: 802309 Change-Id: I5b7bfd7840334979d082c6afa983668ceb020968 Reviewed-on: https://chromium-review.googlesource.com/879548 Commit-Queue: Shakti Sahu <shaktisahu@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#537008} [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/chrome/browser/download/chrome_download_manager_delegate.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/chrome/browser/download/chrome_download_manager_delegate.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_create_info.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_manager_impl.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_manager_impl.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_request_core.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_request_core.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_resource_handler.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_resource_handler.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_response_handler.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/download_response_handler.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/resource_downloader.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/url_downloader.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/browser/download/url_downloader.h [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/public/browser/download_manager_delegate.cc [modify] https://crrev.com/cba5d24ae30bd4fd8199746ec3d63e91a4a1f4c8/content/public/browser/download_manager_delegate.h
Comment 1 by dtrainor@chromium.org
, Jan 22 2018