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

Issue 2528483003: [Android Downloads] Long-press menu item "Download Link" should delegate job to OfflinePages backen… (Closed)

Created:
4 years ago by Dmitry Titov
Modified:
4 years ago
CC:
chili+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, dewittj+watch_chromium.org, dimich+watch_chromium.org, fgorski+watch_chromium.org, jam, petewil+watch_chromium.org, romax+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android Downloads] Long-press menu item "Download Link" should delegate job to OfflinePages backend. This patch interrupts the download and hands it off to the OfflinePage backend once the mime type of the download is detected and it is text/html. Other downloads not affected. BUG=643731 Committed: https://crrev.com/4f6b28049376a0e309fda4cbeb6e4d7aac98965c Cr-Commit-Position: refs/heads/master@{#439630}

Patch Set 1 #

Patch Set 2 : removed unnecessary #include #

Total comments: 6

Patch Set 3 : android-only, no incognito, fix test #

Patch Set 4 : another feedback comment #

Patch Set 5 : updated to use ResourceThrottle #

Patch Set 6 : check for buildflag #

Total comments: 5

Patch Set 7 : Added a simple test and changes per asanka's comments #

Total comments: 6

Patch Set 8 : updated comment #

Patch Set 9 : git merge resolved #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -0 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/android/offline_pages/downloads/resource_throttle.h View 1 2 3 4 5 6 7 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/android/offline_pages/downloads/resource_throttle.cc View 1 2 3 4 5 6 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/browser/android/offline_pages/downloads/resource_throttle_unittest.cc View 1 2 3 4 5 6 1 chunk +100 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_utils.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_utils.cc View 1 2 3 4 5 6 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 49 (29 generated)
Dmitry Titov
Asanka, could you please take a look if this is a reasonable hook up to ...
4 years ago (2016-11-23 01:13:29 UTC) #4
jianli
https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc File chrome/browser/android/offline_pages/offline_page_utils.cc (right): https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc#newcode220 chrome/browser/android/offline_pages/offline_page_utils.cc:220: RequestCoordinator* request_coordinator = RequestCoordinator instance will be null (per ...
4 years ago (2016-11-23 01:27:33 UTC) #7
Pete Williamson
https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc File chrome/browser/android/offline_pages/offline_page_utils.cc (right): https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc#newcode220 chrome/browser/android/offline_pages/offline_page_utils.cc:220: RequestCoordinator* request_coordinator = On 2016/11/23 01:27:32, jianli wrote: > ...
4 years ago (2016-11-23 01:42:41 UTC) #9
Dmitry Titov
PTAL https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc File chrome/browser/android/offline_pages/offline_page_utils.cc (right): https://codereview.chromium.org/2528483003/diff/20001/chrome/browser/android/offline_pages/offline_page_utils.cc#newcode220 chrome/browser/android/offline_pages/offline_page_utils.cc:220: RequestCoordinator* request_coordinator = On 2016/11/23 01:27:32, jianli wrote: ...
4 years ago (2016-11-23 20:18:00 UTC) #13
asanka
Let's not put download handoff logic in DownloadRequestCore. Whether or not a request corresponds to ...
4 years ago (2016-11-23 20:47:13 UTC) #17
Dmitry Titov
On 2016/11/23 20:47:13, asanka wrote: > Let's not put download handoff logic in DownloadRequestCore. Whether ...
4 years ago (2016-11-24 02:04:55 UTC) #18
asanka
On 2016/11/24 at 02:04:55, dimich wrote: > On 2016/11/23 20:47:13, asanka wrote: > > Let's ...
4 years ago (2016-11-28 19:42:05 UTC) #19
Dmitry Titov
asanka, PTAL. I think this is closer to what you had in mind...
4 years ago (2016-12-07 03:47:53 UTC) #22
asanka
Code LGTM with % comments. I'd suggest adding a test and I've noted an existing ...
4 years ago (2016-12-07 16:37:40 UTC) #25
Dmitry Titov
On 2016/12/07 16:37:40, asanka wrote: > You could use the SaveLinkAsReferrerPolicyOrigin test in > //chrome/browser/download/download_browsertest.cc ...
4 years ago (2016-12-17 03:02:04 UTC) #28
Dmitry Titov
+rdsmith as OWNER of chrome/browser/loader.
4 years ago (2016-12-19 19:46:04 UTC) #32
Pete Williamson
https://codereview.chromium.org/2528483003/diff/120001/chrome/browser/android/offline_pages/downloads/resource_throttle.h File chrome/browser/android/offline_pages/downloads/resource_throttle.h (right): https://codereview.chromium.org/2528483003/diff/120001/chrome/browser/android/offline_pages/downloads/resource_throttle.h#newcode16 chrome/browser/android/offline_pages/downloads/resource_throttle.h:16: // file download. It might be nice to beef ...
4 years ago (2016-12-19 21:48:58 UTC) #33
Randy Smith (Not in Mondays)
content/browser/loader LGTM
4 years ago (2016-12-19 22:09:41 UTC) #34
Dmitry Titov
https://codereview.chromium.org/2528483003/diff/120001/chrome/browser/android/offline_pages/downloads/resource_throttle.h File chrome/browser/android/offline_pages/downloads/resource_throttle.h (right): https://codereview.chromium.org/2528483003/diff/120001/chrome/browser/android/offline_pages/downloads/resource_throttle.h#newcode16 chrome/browser/android/offline_pages/downloads/resource_throttle.h:16: // file download. On 2016/12/19 21:48:58, Pete Williamson wrote: ...
4 years ago (2016-12-19 22:39:32 UTC) #35
Pete Williamson
lgtm
4 years ago (2016-12-19 22:42:49 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528483003/140001
4 years ago (2016-12-19 22:45:59 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/125504) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-19 22:48:24 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2528483003/160001
4 years ago (2016-12-19 23:00:51 UTC) #44
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-20 00:19:09 UTC) #47
commit-bot: I haz the power
4 years ago (2016-12-20 00:22:53 UTC) #49
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4f6b28049376a0e309fda4cbeb6e4d7aac98965c
Cr-Commit-Position: refs/heads/master@{#439630}

Powered by Google App Engine
This is Rietveld 408576698