Change the "Save Page As" code to use the network service and perform any opportunistic clean-ups.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e95311238ceb7ef9db929db6b8c2c2ae686a04da commit e95311238ceb7ef9db929db6b8c2c2ae686a04da Author: Jay Civelli <jcivelli@google.com> Date: Wed Feb 28 19:28:44 2018 Remove the content-length member variable from SaveFileResourceHandler The content-length related member variables occurring in a few classes (SaveFileResourceHandler and SaveItem) is not used. Removing it. Also now passing the correct content-description (it was always empty). A few minor clean-ups as well. This work is in preparation of changing that code to use the network service. Bug: 816644 Change-Id: I14f999fc3ce5b0bb77ecf9e1d35311ef7704db8a Reviewed-on: https://chromium-review.googlesource.com/938386 Commit-Queue: Jay Civelli <jcivelli@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#539919} [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file.h [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file_manager.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file_manager.h [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file_resource_handler.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_file_resource_handler.h [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_item.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_item.h [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_package.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_types.cc [modify] https://crrev.com/e95311238ceb7ef9db929db6b8c2c2ae686a04da/content/browser/download/save_types.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf commit 60a313da6edaa2b94a8a8dafa8501e41bec4eeaf Author: Jay Civelli <jcivelli@google.com> Date: Fri Mar 02 21:53:56 2018 Change Save Page to use the network service Making the Save Page code use the URLLoaderFactory instead of using the ResourceDispatcherHost directly. This means the resource downloads are triggered on the UI thread and download notifications also happen on the UI thread. Also removing a NOTREACHED in SimpleURLLoader::OnReceiveCachedMetadata that got hit when downloading some pages and is a valid call that we can ignore. Bug: 816644 , 779210 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: I3c4be94b253392ae6860f8c9e3f1e4fbb752b238 Reviewed-on: https://chromium-review.googlesource.com/944906 Commit-Queue: Jay Civelli <jcivelli@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#540645} [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/BUILD.gn [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_file.h [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_file_manager.cc [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_file_manager.h [delete] https://crrev.com/7f738657cf5049ba6205b56d9b64b8e34405cd30/content/browser/download/save_file_resource_handler.cc [delete] https://crrev.com/7f738657cf5049ba6205b56d9b64b8e34405cd30/content/browser/download/save_file_resource_handler.h [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_package.cc [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_package.h [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_types.cc [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/content/browser/download/save_types.h [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/services/network/public/cpp/simple_url_loader.cc [modify] https://crrev.com/60a313da6edaa2b94a8a8dafa8501e41bec4eeaf/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
Comment 1 by bugdroid1@chromium.org
, Feb 28 2018