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

Issue 1217223006: Prompt user for file access permission before download starts (Closed)

Created:
5 years, 5 months ago by qinmin
Modified:
5 years, 5 months ago
CC:
asanka, benjhayden+dwatch_chromium.org, 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

Prompt user for file access permission before download starts Please bring the discussion offline. Background: On some systems we need to ask for user permission before download is able to write to storage. This change adds an extra step to check file access at the begining of file path generation. If user is granted file access, download will proceed. Otherwise, it will be canceled. BUG=501606 Committed: https://crrev.com/1fa54a4e6bac3ecb49a61ee9594fe73fc23edd0d Cr-Commit-Position: refs/heads/master@{#337686}

Patch Set 1 : #

Total comments: 16

Patch Set 2 : nits #

Patch Set 3 : addressing asanka's comments #

Total comments: 10

Patch Set 4 : addressing comments #

Patch Set 5 : FixDownloadManagerDelegateTest #

Total comments: 6

Patch Set 6 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -4 lines) Patch
A chrome/browser/android/download/mock_download_controller_android.h View 1 2 3 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/android/download/mock_download_controller_android.cc View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate_unittest.cc View 1 2 3 4 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/download/download_target_determiner.h View 1 2 3 4 5 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/download/download_target_determiner.cc View 1 2 3 4 5 4 chunks +37 lines, -1 line 0 comments Download
M chrome/browser/download/download_target_determiner_unittest.cc View 1 2 3 4 chunks +44 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/android/download_controller_android_impl.h View 1 2 3 4 5 3 chunks +13 lines, -0 lines 0 comments Download
M content/browser/android/download_controller_android_impl.cc View 1 2 3 4 5 7 chunks +99 lines, -3 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/DownloadController.java View 2 chunks +30 lines, -0 lines 0 comments Download
M content/public/browser/android/download_controller_android.h View 1 2 3 3 chunks +19 lines, -0 lines 0 comments Download
A content/public/browser/android/download_controller_android.cc View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (12 generated)
qinmin
PTAL. @tedchoc for content/browser/android/ @rdsmith for chrome/browser/download/
5 years, 5 months ago (2015-07-01 23:04:38 UTC) #3
Randy Smith (Not in Mondays)
If Asanka is around and able to review this, he'd be a better person than ...
5 years, 5 months ago (2015-07-02 01:51:21 UTC) #5
qinmin
@asanka, would you please take a look at this with high priorities? thanks
5 years, 5 months ago (2015-07-06 17:19:38 UTC) #6
Ted C
overall seems good...question about lifetimes but assuming the download controller is at the process level, ...
5 years, 5 months ago (2015-07-06 20:03:39 UTC) #7
qinmin
https://codereview.chromium.org/1217223006/diff/20001/chrome/browser/download/download_target_determiner.cc File chrome/browser/download/download_target_determiner.cc (right): https://codereview.chromium.org/1217223006/diff/20001/chrome/browser/download/download_target_determiner.cc#newcode78 chrome/browser/download/download_target_determiner.cc:78: // Download controller for file access prompt. On 2015/07/06 ...
5 years, 5 months ago (2015-07-06 20:36:02 UTC) #8
Ted C
lgtm
5 years, 5 months ago (2015-07-06 20:39:00 UTC) #9
asanka
I've left some low level comments, but this permission test doesn't belong in the download ...
5 years, 5 months ago (2015-07-06 21:09:41 UTC) #10
qinmin
On 2015/07/06 21:09:41, asanka wrote: > I've left some low level comments, but this permission ...
5 years, 5 months ago (2015-07-06 21:41:29 UTC) #11
qinmin
https://codereview.chromium.org/1217223006/diff/20001/chrome/browser/download/download_target_determiner.cc File chrome/browser/download/download_target_determiner.cc (right): https://codereview.chromium.org/1217223006/diff/20001/chrome/browser/download/download_target_determiner.cc#newcode79 chrome/browser/download/download_target_determiner.cc:79: content::DownloadControllerAndroid* g_download_controller_; On 2015/07/06 21:09:41, asanka wrote: > I ...
5 years, 5 months ago (2015-07-07 00:54:22 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1217223006/80001
5 years, 5 months ago (2015-07-07 00:59:55 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/41294)
5 years, 5 months ago (2015-07-07 02:57:31 UTC) #18
asanka
https://codereview.chromium.org/1217223006/diff/80001/chrome/browser/download/download_target_determiner.cc File chrome/browser/download/download_target_determiner.cc (right): https://codereview.chromium.org/1217223006/diff/80001/chrome/browser/download/download_target_determiner.cc#newcode110 chrome/browser/download/download_target_determiner.cc:110: download_controller_(content::DownloadControllerAndroid::Get()), A member variable is unnecessary for this. https://codereview.chromium.org/1217223006/diff/80001/chrome/browser/download/download_target_determiner.cc#newcode195 ...
5 years, 5 months ago (2015-07-07 05:03:34 UTC) #19
asanka
Does this degrade gracefully when the platform doesn't require a runtime permission for file access?
5 years, 5 months ago (2015-07-07 05:05:11 UTC) #20
qinmin
On 2015/07/07 05:05:11, asanka wrote: > Does this degrade gracefully when the platform doesn't require ...
5 years, 5 months ago (2015-07-07 05:12:44 UTC) #21
qinmin
https://codereview.chromium.org/1217223006/diff/80001/chrome/browser/download/download_target_determiner.cc File chrome/browser/download/download_target_determiner.cc (right): https://codereview.chromium.org/1217223006/diff/80001/chrome/browser/download/download_target_determiner.cc#newcode110 chrome/browser/download/download_target_determiner.cc:110: download_controller_(content::DownloadControllerAndroid::Get()), On 2015/07/07 05:03:33, asanka wrote: > A member ...
5 years, 5 months ago (2015-07-07 06:14:05 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1217223006/120001
5 years, 5 months ago (2015-07-07 16:16:54 UTC) #25
Randy Smith (Not in Mondays)
I'd prefer to do this right (M45), not quickly with technical debt buildup (M44)--as I ...
5 years, 5 months ago (2015-07-07 16:18:12 UTC) #26
Randy Smith (Not in Mondays)
On 2015/07/07 16:18:12, rdsmith wrote: > I'd prefer to do this right (M45), not quickly ...
5 years, 5 months ago (2015-07-07 16:23:35 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-07 17:18:01 UTC) #29
qinmin
On 2015/07/07 17:18:01, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
5 years, 5 months ago (2015-07-07 17:33:54 UTC) #30
asanka
LGTM modulo nits. Optionally nits could be resolved during the next cleanup CL. https://codereview.chromium.org/1217223006/diff/120001/chrome/browser/download/download_target_determiner.cc File ...
5 years, 5 months ago (2015-07-07 17:39:24 UTC) #31
qinmin
https://codereview.chromium.org/1217223006/diff/120001/chrome/browser/download/download_target_determiner.cc File chrome/browser/download/download_target_determiner.cc (right): https://codereview.chromium.org/1217223006/diff/120001/chrome/browser/download/download_target_determiner.cc#newcode197 chrome/browser/download/download_target_determiner.cc:197: void DownloadTargetDeterminer::PromptUserForPermissionDone(bool granted) { On 2015/07/07 17:39:24, asanka wrote: ...
5 years, 5 months ago (2015-07-07 20:52:50 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1217223006/140001
5 years, 5 months ago (2015-07-07 20:54:20 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:140001)
5 years, 5 months ago (2015-07-07 22:06:14 UTC) #36
commit-bot: I haz the power
5 years, 5 months ago (2015-07-07 22:08:17 UTC) #37
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/1fa54a4e6bac3ecb49a61ee9594fe73fc23edd0d
Cr-Commit-Position: refs/heads/master@{#337686}

Powered by Google App Engine
This is Rietveld 408576698