New issue
Advanced search Search tips

Issue 717077 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

detach WebContents from Download

Project Member Reported by qin...@chromium.org, May 1 2017

Issue description

There are lots of places that download is using webcontents to show an infobar or for permission checks.

In theory, download shouldn't need the webcontents. When user click a link, the download should automatically take place. And it is wierd that kicking off a download requires WebContents, but resuming it doesn't.

On desktop, there is a download shelf at the bottom of the window. For android, it has more reliance on the webcontents.

We should detach webcontents from download as much as possible. And this also help us move closer to make download as a standalone service.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05fa41d9751a443a76dde0fe53cbfa927bb5d001

commit 05fa41d9751a443a76dde0fe53cbfa927bb5d001
Author: qinmin <qinmin@chromium.org>
Date: Sat May 06 19:03:13 2017

remove reliance on webcontents when requesting storage permission

When requesting storage permission, we don't need WebContents most of the time.
WebContents is only needed when we need to show the permission infobar.
This CL removes all the WebContents check when requesting storage permission.
Caller can pass an empty WebContentsGetter callback if they don't need infobar.

BUG=717077

Review-Url: https://codereview.chromium.org/2850223002
Cr-Commit-Position: refs/heads/master@{#469861}

[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/chrome_download_delegate.cc
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/download_controller.cc
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/download_controller.h
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/download_controller_base.h
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/mock_download_controller.cc
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/android/download/mock_download_controller.h
[modify] https://crrev.com/05fa41d9751a443a76dde0fe53cbfa927bb5d001/chrome/browser/download/download_resource_throttle.cc

Sign in to add a comment