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

Issue 10412061: Fix crashes in DownloadRequestLimiter when extension popups/bubbles initiate downloads automatically (Closed)

Created:
8 years, 7 months ago by benjhayden
Modified:
8 years, 6 months ago
CC:
chromium-reviews, rdsmith+dwatch_chromium.org, tfarina
Visibility:
Public.

Description

Fix crashes in DownloadRequestLimiter when extension popups/bubbles initiate downloads automatically Automatically cancel automatic (non-user-gesture) downloads from bubbles after the first. Merge DownloadRequestLimiterObserver into TabDownloadState. (NavigationController and WebContents are 1:1.) TODO eventually: send a message to extensions' consoles about chrome.downloads.download() when automatic downloads are automatically cancelled. Every WebContents continues to get one automatic download. This patch is based on Avi's https://chromiumcodereview.appspot.com/10409031/ BUG=128368 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=139554

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 4

Patch Set 4 : DRL makes DRLOs instead of TCW #

Patch Set 5 : comment #

Total comments: 2

Patch Set 6 : merge #

Patch Set 7 : merge DRLO into TabDownloadState #

Patch Set 8 : merge #

Total comments: 2

Patch Set 9 : test #

Total comments: 2

Patch Set 10 : update download_browsertest.cc #

Total comments: 8

Patch Set 11 : comment #

Patch Set 12 : comments #

Total comments: 2

Patch Set 13 : comment #

Total comments: 5

Patch Set 14 : merge #

Patch Set 15 : undo #

Patch Set 16 : undo #

Patch Set 17 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -155 lines) Patch
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/download/download_request_limiter.h View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +16 lines, -19 lines 0 comments Download
M chrome/browser/download/download_request_limiter.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +83 lines, -67 lines 0 comments Download
M chrome/browser/download/download_request_limiter_observer.h View 1 2 3 4 5 6 1 chunk +0 lines, -23 lines 0 comments Download
M chrome/browser/download/download_request_limiter_observer.cc View 1 2 3 4 5 6 1 chunk +0 lines, -24 lines 0 comments Download
M chrome/browser/download/download_request_limiter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +79 lines, -9 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
benjhayden
I'm still looking into why second/third/etc. downloads are not marked OnUserGesture(), so feel free to ...
8 years, 7 months ago (2012-05-23 20:45:25 UTC) #1
Avi (use Gerrit)
To the extent that I'm allowed to do so with a patch that I wrote ...
8 years, 7 months ago (2012-05-23 20:53:28 UTC) #2
Randy Smith (Not in Mondays)
DownloadRequestLimiter changes LGTM; I don't know the extension_host* code. http://codereview.chromium.org/10412061/diff/1004/chrome/browser/download/download_request_limiter.cc File chrome/browser/download/download_request_limiter.cc (right): http://codereview.chromium.org/10412061/diff/1004/chrome/browser/download/download_request_limiter.cc#newcode89 chrome/browser/download/download_request_limiter.cc:89: ...
8 years, 7 months ago (2012-05-23 21:57:53 UTC) #3
benjhayden
PTAL Which suggested chrome/browser/ui owner do you think would be best? phajdan.jr@chromium.org ben@chromium.org kalman@chromium.org http://codereview.chromium.org/10412061/diff/1004/chrome/browser/download/download_request_limiter.cc ...
8 years, 7 months ago (2012-05-24 20:43:38 UTC) #4
Avi (use Gerrit)
Re who to ask, pick one and try it. I stopped reviewing after seeing your ...
8 years, 7 months ago (2012-05-24 20:48:44 UTC) #5
benjhayden
http://codereview.chromium.org/10412061/diff/12011/chrome/browser/download/download_request_limiter.cc File chrome/browser/download/download_request_limiter.cc (right): http://codereview.chromium.org/10412061/diff/12011/chrome/browser/download/download_request_limiter.cc#newcode314 chrome/browser/download/download_request_limiter.cc:314: // many WebContents per NavigationController. A NavigationController is On ...
8 years, 7 months ago (2012-05-24 21:01:14 UTC) #6
Avi (use Gerrit)
On 2012/05/24 21:01:14, benjhayden_chromium wrote: > "The NavigationController also owns all WebContents for the tab." ...
8 years, 7 months ago (2012-05-24 21:28:41 UTC) #7
benjhayden
PTAL
8 years, 6 months ago (2012-05-25 15:08:32 UTC) #8
Avi (use Gerrit)
The approach looks reasonable to me; get download and extensions people to sign off on ...
8 years, 6 months ago (2012-05-25 16:19:16 UTC) #9
benjhayden
Aaron, Pawel, Randy: PTAL. http://codereview.chromium.org/10412061/diff/23001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/10412061/diff/23001/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode270 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:270: // WebContents, don't put it ...
8 years, 6 months ago (2012-05-25 18:41:10 UTC) #10
Randy Smith (Not in Mondays)
High level comments: * The issue description seems contradictory to offline conversations with Avi; could ...
8 years, 6 months ago (2012-05-25 18:52:34 UTC) #11
Aaron Boodman
http://codereview.chromium.org/10412061/diff/18003/chrome/browser/extensions/extension_host.cc File chrome/browser/extensions/extension_host.cc (right): http://codereview.chromium.org/10412061/diff/18003/chrome/browser/extensions/extension_host.cc#newcode417 chrome/browser/extensions/extension_host.cc:417: Browser* browser = browser::FindTabbedBrowser( Any old browser? Seems like ...
8 years, 6 months ago (2012-05-25 19:27:42 UTC) #12
Avi (use Gerrit)
http://codereview.chromium.org/10412061/diff/18003/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/10412061/diff/18003/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode268 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:268: // WARNING: There is no TabContentsWrapper for extension popups/bubbles ...
8 years, 6 months ago (2012-05-25 19:49:52 UTC) #13
benjhayden
PTAL http://codereview.chromium.org/10412061/diff/16005/chrome/browser/download/download_request_limiter_unittest.cc File chrome/browser/download/download_request_limiter_unittest.cc (right): http://codereview.chromium.org/10412061/diff/16005/chrome/browser/download/download_request_limiter_unittest.cc#newcode272 chrome/browser/download/download_request_limiter_unittest.cc:272: // ALLOW_ONE_DOWNLOAD when there's no TCW? On 2012/05/25 ...
8 years, 6 months ago (2012-05-25 20:41:17 UTC) #14
Avi (use Gerrit)
http://codereview.chromium.org/10412061/diff/20022/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/10412061/diff/20022/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode280 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:280: // least to make easy for other WebContents hosts ...
8 years, 6 months ago (2012-05-25 20:44:56 UTC) #15
benjhayden
http://codereview.chromium.org/10412061/diff/20022/chrome/browser/ui/tab_contents/tab_contents_wrapper.h File chrome/browser/ui/tab_contents/tab_contents_wrapper.h (right): http://codereview.chromium.org/10412061/diff/20022/chrome/browser/ui/tab_contents/tab_contents_wrapper.h#newcode280 chrome/browser/ui/tab_contents/tab_contents_wrapper.h:280: // least to make easy for other WebContents hosts ...
8 years, 6 months ago (2012-05-25 21:00:49 UTC) #16
Randy Smith (Not in Mondays)
Avi: I just want to confirm that the top level CL comment that NavigationController and ...
8 years, 6 months ago (2012-05-25 21:31:37 UTC) #17
Avi (use Gerrit)
Content lgtm. On 2012/05/25 21:31:37, rdsmith wrote: > Avi: I just want to confirm that ...
8 years, 6 months ago (2012-05-25 21:34:44 UTC) #18
benjhayden
-Pawel +Ben Goodger I'll ping Ben and Aaron on Monday.
8 years, 6 months ago (2012-05-26 20:49:08 UTC) #19
tfarina
http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h File chrome/browser/download/download_request_limiter.h (right): http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h#newcode102 chrome/browser/download/download_request_limiter.h:102: // Promote protected accessor to public. nit: what is ...
8 years, 6 months ago (2012-05-26 22:46:17 UTC) #20
Randy Smith (Not in Mondays)
http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h File chrome/browser/download/download_request_limiter.h (right): http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h#newcode102 chrome/browser/download/download_request_limiter.h:102: // Promote protected accessor to public. On 2012/05/26 22:46:18, ...
8 years, 6 months ago (2012-05-27 13:28:58 UTC) #21
tfarina
http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h File chrome/browser/download/download_request_limiter.h (right): http://codereview.chromium.org/10412061/diff/16009/chrome/browser/download/download_request_limiter.h#newcode102 chrome/browser/download/download_request_limiter.h:102: // Promote protected accessor to public. On 2012/05/27 13:28:59, ...
8 years, 6 months ago (2012-05-27 13:41:40 UTC) #22
Ben Goodger (Google)
Instead, you need to provide the type to EH that exposes the minimal set of ...
8 years, 6 months ago (2012-05-29 18:23:48 UTC) #23
Avi (use Gerrit)
On 2012/05/29 18:23:48, Ben Goodger (Google) wrote: > I don't like exposing these as part ...
8 years, 6 months ago (2012-05-29 18:38:12 UTC) #24
benjhayden
I'll separate the contentious ExtensionHost/Browser changes out into another CL. They aren't necessary for fixing ...
8 years, 6 months ago (2012-05-29 20:29:09 UTC) #25
benjhayden
On 2012/05/29 20:29:09, benjhayden_chromium wrote: > I'll separate the contentious ExtensionHost/Browser changes out into another ...
8 years, 6 months ago (2012-05-29 20:46:26 UTC) #26
Ben Goodger (Google)
LGTM for that bit
8 years, 6 months ago (2012-05-29 21:02:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10412061/11021
8 years, 6 months ago (2012-05-30 15:35:58 UTC) #28
commit-bot: I haz the power
8 years, 6 months ago (2012-05-30 17:04:32 UTC) #29
Change committed as 139554

Powered by Google App Engine
This is Rietveld 408576698