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

Issue 6459005: Cancel prerender when we discover a download starting from a page we are prer... (Closed)

Created:
9 years, 10 months ago by dominich
Modified:
9 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Cancel prerender when we discover a download starting from a page we are prerendering. BUG=71214 TEST=Search for carbon poker download and wait. The first result, which has a <link rel="prefetch"> will not cause a prerender as the download that the next page starts will cancel it. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75168

Patch Set 1 #

Patch Set 2 : Adding browser test #

Total comments: 13

Patch Set 3 : '' #

Patch Set 4 : Now with conflicts resolved #

Total comments: 21

Patch Set 5 : Changed source of notification and now notify on all entry points for download initiation. #

Total comments: 12

Patch Set 6 : Moved notification to ctor and added notification for manual downloads #

Total comments: 5

Patch Set 7 : Moved notification to download_util to be more central #

Total comments: 4

Patch Set 8 : Moved second notification to RDH::BeginDownload #

Patch Set 9 : Post resolve #

Total comments: 4

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -4 lines) Patch
M chrome/browser/download/download_util.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/download/download_util.cc View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 2 3 4 5 6 7 8 9 4 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_final_status.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/download_throttling_resource_handler.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/common/notification_type.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/prerender/prerender_download_iframe.html View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/prerender/prerender_download_location.html View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/prerender/prerender_download_refresh.html View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
dominich
9 years, 10 months ago (2011-02-08 23:58:41 UTC) #1
cbentzel
Randy - the download is triggered via an iframe with a src set to a ...
9 years, 10 months ago (2011-02-09 10:47:08 UTC) #2
cbentzel
The big question for me is whether this is the earliest possible place to trigger ...
9 years, 10 months ago (2011-02-09 12:11:13 UTC) #3
cbentzel
http://codereview.chromium.org/6459005/diff/7/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/6459005/diff/7/chrome/browser/prerender/prerender_contents.cc#newcode87 chrome/browser/prerender/prerender_contents.cc:87: registrar_.Add(this, NotificationType::DOWNLOAD_STARTED, Instead of registering with AllSources, you could ...
9 years, 10 months ago (2011-02-09 12:19:15 UTC) #4
cbentzel
So, I'm not convinced DownloadThrottlingResourceHandler is the right place to put the notification. There's other ...
9 years, 10 months ago (2011-02-09 13:08:50 UTC) #5
Randy Smith (Not in Mondays)
[Not yet my full review, just tossing in a couple of comments. ] On 2011/02/09 ...
9 years, 10 months ago (2011-02-09 13:41:30 UTC) #6
Randy Smith (Not in Mondays)
I'm going to wait for my primary review on the resolution to Chris' points (it ...
9 years, 10 months ago (2011-02-09 13:52:17 UTC) #7
Randy Smith (Not in Mondays)
On 2011/02/09 10:47:08, cbentzel wrote: > Randy - the download is triggered via an iframe ...
9 years, 10 months ago (2011-02-09 14:01:53 UTC) #8
Randy Smith (Not in Mondays)
On 2011/02/09 12:11:13, cbentzel wrote: > The big question for me is whether this is ...
9 years, 10 months ago (2011-02-09 14:03:37 UTC) #9
cbentzel
On Wed, Feb 9, 2011 at 9:01 AM, <rdsmith@chromium.org> wrote: > On 2011/02/09 10:47:08, cbentzel ...
9 years, 10 months ago (2011-02-09 14:54:39 UTC) #10
dominich
On 2011/02/09 13:08:50, cbentzel wrote: > So, I'm not convinced DownloadThrottlingResourceHandler is the right place ...
9 years, 10 months ago (2011-02-09 16:25:57 UTC) #11
dominich
On 2011/02/09 13:52:17, rdsmith wrote: > I'm going to wait for my primary review on ...
9 years, 10 months ago (2011-02-09 16:27:47 UTC) #12
dominich
On 2011/02/09 14:03:37, rdsmith wrote: > On 2011/02/09 12:11:13, cbentzel wrote: > > The big ...
9 years, 10 months ago (2011-02-09 16:29:55 UTC) #13
dominich
On 2011/02/09 14:54:39, cbentzel wrote: > On Wed, Feb 9, 2011 at 9:01 AM, <mailto:rdsmith@chromium.org> ...
9 years, 10 months ago (2011-02-09 16:31:30 UTC) #14
Randy Smith (Not in Mondays)
On 2011/02/09 14:54:39, cbentzel wrote: > On Wed, Feb 9, 2011 at 9:01 AM, <mailto:rdsmith@chromium.org> ...
9 years, 10 months ago (2011-02-09 16:34:29 UTC) #15
Randy Smith (Not in Mondays)
On 2011/02/09 16:25:57, dominic wrote: > On 2011/02/09 13:08:50, cbentzel wrote: > > So, I'm ...
9 years, 10 months ago (2011-02-09 16:35:22 UTC) #16
Randy Smith (Not in Mondays)
On 2011/02/09 16:27:47, dominic wrote: > On 2011/02/09 13:52:17, rdsmith wrote: > > I'm going ...
9 years, 10 months ago (2011-02-09 16:37:08 UTC) #17
Randy Smith (Not in Mondays)
> As I mentioned above, I didn't find that the download made it to the ...
9 years, 10 months ago (2011-02-09 16:53:53 UTC) #18
dominic_google.com
On Wed, Feb 9, 2011 at 8:53 AM, <rdsmith@chromium.org> wrote: > As I mentioned above, ...
9 years, 10 months ago (2011-02-09 16:56:22 UTC) #19
dominich
On 2011/02/09 16:53:53, rdsmith wrote: > > As I mentioned above, I didn't find that ...
9 years, 10 months ago (2011-02-09 17:58:16 UTC) #20
Randy Smith (Not in Mondays)
On 2011/02/09 17:58:16, dominic wrote: > The DownloadRequestLimiter is cancelling the download immediately as the ...
9 years, 10 months ago (2011-02-09 18:13:30 UTC) #21
cbentzel
I was hoping that there was a single entry point for kicking off a download ...
9 years, 10 months ago (2011-02-09 21:39:56 UTC) #22
dominich
Added more browser test variations for downloading of files based on existing download browser tests. ...
9 years, 10 months ago (2011-02-09 22:33:30 UTC) #23
cbentzel
http://codereview.chromium.org/6459005/diff/11003/chrome/browser/renderer_host/download_throttling_resource_handler.cc File chrome/browser/renderer_host/download_throttling_resource_handler.cc (right): http://codereview.chromium.org/6459005/diff/11003/chrome/browser/renderer_host/download_throttling_resource_handler.cc#newcode8 chrome/browser/renderer_host/download_throttling_resource_handler.cc:8: #include "chrome/browser/cert_store.h" A bunch of these includes are not ...
9 years, 10 months ago (2011-02-10 14:44:34 UTC) #24
Randy Smith (Not in Mondays)
I apologize for requesting the extra work, but I'd like to see this put on ...
9 years, 10 months ago (2011-02-10 16:57:10 UTC) #25
dominich
http://codereview.chromium.org/6459005/diff/11003/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/6459005/diff/11003/chrome/browser/prerender/prerender_contents.cc#newcode220 chrome/browser/prerender/prerender_contents.cc:220: // delegating, kill the prerender. This will also stop ...
9 years, 10 months ago (2011-02-10 18:46:22 UTC) #26
cbentzel
Prerender stuff looks fine, but the downloads change still looks wrong to me. http://codereview.chromium.org/6459005/diff/14001/chrome/browser/prerender/prerender_contents.cc File ...
9 years, 10 months ago (2011-02-10 19:32:18 UTC) #27
dominich
Annotated some changes but i'm not uploading a new patch set yet. I went through ...
9 years, 10 months ago (2011-02-10 20:02:17 UTC) #28
Randy Smith (Not in Mondays)
I just read through and reviewed the download code. I would like to see the ...
9 years, 10 months ago (2011-02-11 18:44:15 UTC) #29
dominic_google.com
On Fri, Feb 11, 2011 at 10:44 AM, <rdsmith@chromium.org> wrote: > I just read through ...
9 years, 10 months ago (2011-02-11 22:11:18 UTC) #30
dominich
http://codereview.chromium.org/6459005/diff/14001/chrome/browser/renderer_host/download_throttling_resource_handler.cc File chrome/browser/renderer_host/download_throttling_resource_handler.cc (right): http://codereview.chromium.org/6459005/diff/14001/chrome/browser/renderer_host/download_throttling_resource_handler.cc#newcode86 chrome/browser/renderer_host/download_throttling_resource_handler.cc:86: render_process_host_id_, render_view_id_)); On 2011/02/11 18:44:15, rdsmith wrote: > Why ...
9 years, 10 months ago (2011-02-11 22:51:54 UTC) #31
Randy Smith (Not in Mondays)
http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc File chrome/browser/renderer_host/download_resource_handler.cc (right): http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc#newcode68 chrome/browser/renderer_host/download_resource_handler.cc:68: render_process_host_id, render_view_id_)); I'd rather not notify from the DownloadResourceHandler ...
9 years, 10 months ago (2011-02-13 03:08:36 UTC) #32
dominich
http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc File chrome/browser/renderer_host/download_resource_handler.cc (right): http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc#newcode68 chrome/browser/renderer_host/download_resource_handler.cc:68: render_process_host_id, render_view_id_)); On 2011/02/13 03:08:36, rdsmith wrote: > I'd ...
9 years, 10 months ago (2011-02-14 16:07:12 UTC) #33
Randy Smith (Not in Mondays)
I think we're almost there. Just a few comments. http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc File chrome/browser/renderer_host/download_resource_handler.cc (right): http://codereview.chromium.org/6459005/diff/22001/chrome/browser/renderer_host/download_resource_handler.cc#newcode68 chrome/browser/renderer_host/download_resource_handler.cc:68: ...
9 years, 10 months ago (2011-02-14 19:20:51 UTC) #34
dominich
http://codereview.chromium.org/6459005/diff/28001/chrome/browser/download/download_util.cc File chrome/browser/download/download_util.cc (right): http://codereview.chromium.org/6459005/diff/28001/chrome/browser/download/download_util.cc#newcode748 chrome/browser/download/download_util.cc:748: render_process_host_id, render_view_id)); On 2011/02/14 19:20:51, rdsmith wrote: > See ...
9 years, 10 months ago (2011-02-15 19:09:19 UTC) #35
cbentzel
LGTM, with two nits. Please make sure Randy is OK with the download+RDH change. http://codereview.chromium.org/6459005/diff/43005/chrome/browser/prerender/prerender_contents.cc ...
9 years, 10 months ago (2011-02-15 20:51:23 UTC) #36
dominich
Fixed the nits. Will wait to upload in case rdsmith has any more comments. http://codereview.chromium.org/6459005/diff/43005/chrome/browser/prerender/prerender_contents.cc ...
9 years, 10 months ago (2011-02-15 21:25:42 UTC) #37
Randy Smith (Not in Mondays)
LGTM (only download and resource_dispatcher_host.* portions reviewed).
9 years, 10 months ago (2011-02-15 22:33:33 UTC) #38
cbentzel
9 years, 10 months ago (2011-02-15 22:34:40 UTC) #39
LGTM

On Tue, Feb 15, 2011 at 5:33 PM, <rdsmith@chromium.org> wrote:

> LGTM (only download and resource_dispatcher_host.* portions reviewed).
>
>
>
> http://codereview.chromium.org/6459005/
>

Powered by Google App Engine
This is Rietveld 408576698