Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Issue 1644743003: Use DownloadManager to initiate downloads instead ResourceDispatcherHost (Closed)

Created:
4 years, 10 months ago by asanka
Modified:
4 years, 10 months ago
Reviewers:
davidben
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use DownloadManager to initiate downloads instead ResourceDispatcherHost Downloads have two major failure pathways: dealing with failures before DownloadResourceHandler/DownloadRequestCore creation, and dealing with failures after. Somewhat relatedly, ResourceDispatcherHost::BeginDownload() currently is responsible for implementing some aspects of download initiation that really don't belong there. For example, download started callbacks are handled by ResourceDispatcherHost prior to the creation of DownloadResourceHandler. Both of these aren't great. In order to unify failure paths and remove downloads handling code from ResourceDispatcherHost, we need to first need to reduce RDH::BeginDownload callers down to just DownloadManagerImpl. Then we can move download handling logic out of RDH into DownloadManager. This CL removes the only other caller of RDH::BeginDownload, which is RenderMessageFilter. It now makes a UI thread hop to initiate a download via DownloadManager. The overhead of the thread hop should be negligible since the frequency of download requests are low. The touched code paths are already being exercised by existing content_browsertests. R=davidben@chromium.org BUG=7648 Committed: https://crrev.com/bb028fc67f0835b30bd2ce5d953caa101c15c961 Cr-Commit-Position: refs/heads/master@{#372381}

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -14 lines) Patch
M content/browser/renderer_host/render_message_filter.cc View 1 3 chunks +27 lines, -14 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
asanka
4 years, 10 months ago (2016-01-28 20:51:35 UTC) #3
davidben
lgtm
4 years, 10 months ago (2016-01-28 21:25:34 UTC) #4
asanka
On 2016/01/28 21:25:34, davidben (slow) wrote: > lgtm Thanks!
4 years, 10 months ago (2016-01-28 21:26:24 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1644743003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1644743003/20001
4 years, 10 months ago (2016-01-29 17:17:56 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-01-29 18:28:00 UTC) #8
commit-bot: I haz the power
4 years, 10 months ago (2016-01-29 18:29:04 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/bb028fc67f0835b30bd2ce5d953caa101c15c961
Cr-Commit-Position: refs/heads/master@{#372381}

Powered by Google App Engine
This is Rietveld 408576698