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

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed)

Created:
9 years, 3 months ago by Randy Smith (Not in Mondays)
Modified:
7 years, 7 months ago
Reviewers:
eroman, ahendrickson, jennb
CC:
chromium-reviews, asanka, jam, cbentzel+watch_chromium.org, prasadt, dpranke+watch-content_chromium.org, kkania, Dmitry Titov, dcheng, joi+watch-content_chromium.org, darin-cc_chromium.org, jianli, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Make cancel remove cancelled download from active queues at time of cancel. Also add various tests required or enabled by this change. This changes two aspects of Cancel semantics (for downloads, not save page): a) Cancel can now be called anytime during the lifetime of a download, and b) if it is called before the history callback occurs, the download will be removed from the system (no where to store it persistently while waiting) BUG=85408 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=101510 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102126

Patch Set 1 #

Patch Set 2 : Fixes from self-review and further compilation. #

Patch Set 3 : Fixes from running tests locally in Sandbox. #

Total comments: 2

Patch Set 4 : Merged to LKGR. #

Patch Set 5 : Incorporate one comment of Eric's and fix problems from try runs. #

Patch Set 6 : Final Cancel arg fix. #

Total comments: 19

Patch Set 7 : Incorporated Andy's comments. #

Patch Set 8 : Incorporated Ben's comments. #

Patch Set 9 : Merged to TOT. #

Patch Set 10 : Fixed merge failure. #

Patch Set 11 : Merged to TOT. #

Patch Set 12 : Removed unneeded profile changes. #

Patch Set 13 : Merged to TOT. #

Patch Set 14 : Merge to LKGR. #

Patch Set 15 : Fix to try to get past main waterfall failure. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+765 lines, -311 lines) Patch
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 21 chunks +540 lines, -142 lines 0 comments Download
M chrome/browser/download/download_history.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_history.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_manager_unittest.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_controller.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/download/download_item_gtk.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/download/download_item_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/active_downloads_ui.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/downloads_dom_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/download-dangerous.jar View 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/data/download-dangerous.jar.mock-http-headers View 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/download/download_item.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -15 lines 0 comments Download
M content/browser/download/download_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +49 lines, -19 lines 0 comments Download
M content/browser/download/download_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +23 lines, -20 lines 0 comments Download
M content/browser/download/download_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +45 lines, -67 lines 0 comments Download
M content/browser/download/download_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_request_handle.h View 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/download/download_stats.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/download/mock_download_manager_delegate.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/mock_download_manager_delegate.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/save_package.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/net/url_request_slow_download_job.h View 1 2 3 4 5 6 7 8 3 chunks +13 lines, -6 lines 0 comments Download
M content/browser/net/url_request_slow_download_job.cc View 8 chunks +36 lines, -15 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Randy Smith (Not in Mondays)
PTAL. This CL was originally uploaded as http://codereview.chromium.org/7294013, but work on that got back burned ...
9 years, 3 months ago (2011-09-10 01:15:19 UTC) #1
eroman
LGTM on browser/net/* http://codereview.chromium.org/7796014/diff/4001/content/browser/net/url_request_slow_download_job.h File content/browser/net/url_request_slow_download_job.h (right): http://codereview.chromium.org/7796014/diff/4001/content/browser/net/url_request_slow_download_job.h#newcode4 content/browser/net/url_request_slow_download_job.h:4: // This class simulates a slow ...
9 years, 3 months ago (2011-09-10 01:53:50 UTC) #2
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7796014/diff/4001/content/browser/net/url_request_slow_download_job.h File content/browser/net/url_request_slow_download_job.h (right): http://codereview.chromium.org/7796014/diff/4001/content/browser/net/url_request_slow_download_job.h#newcode4 content/browser/net/url_request_slow_download_job.h:4: // This class simulates a slow download. This used ...
9 years, 3 months ago (2011-09-10 16:14:38 UTC) #3
ahendrickson
LGTM, with some nits. http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.h File content/browser/download/download_item.h (right): http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.h#newcode184 content/browser/download/download_item.h:184: // |size| is the amount ...
9 years, 3 months ago (2011-09-11 15:57:01 UTC) #4
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.h File content/browser/download/download_item.h (right): http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.h#newcode184 content/browser/download/download_item.h:184: // |size| is the amount of data received so ...
9 years, 3 months ago (2011-09-12 18:00:27 UTC) #5
benjhayden
http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc File content/browser/download/download_item.cc (right): http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc#newcode324 content/browser/download/download_item.cc:324: void DownloadItem::StopInternal(DownloadState target_state) { Would you rather do this ...
9 years, 3 months ago (2011-09-12 18:13:37 UTC) #6
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc File content/browser/download/download_item.cc (right): http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc#newcode324 content/browser/download/download_item.cc:324: void DownloadItem::StopInternal(DownloadState target_state) { On 2011/09/12 18:13:38, b s ...
9 years, 3 months ago (2011-09-12 19:43:23 UTC) #7
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc File content/browser/download/download_item.cc (right): http://codereview.chromium.org/7796014/diff/7029/content/browser/download/download_item.cc#newcode327 content/browser/download/download_item.cc:327: DCHECK(target_state == CANCELLED || target_state == INTERRUPTED); On 2011/09/12 ...
9 years, 3 months ago (2011-09-12 19:44:36 UTC) #8
benjhayden
LGTM Thanks!
9 years, 3 months ago (2011-09-12 19:57:55 UTC) #9
jennb
LGTM for the panels change.
9 years, 3 months ago (2011-09-12 20:52:48 UTC) #10
Randy Smith (Not in Mondays)
Andy, PTAL? I'd recommend you look at the PS14->15 changes; 13->14 was just the merge ...
9 years, 3 months ago (2011-09-20 15:50:53 UTC) #11
ahendrickson
Changes from PS14->15 LGTM. Note: I couldn't open any of the links to the failing ...
9 years, 3 months ago (2011-09-20 18:22:32 UTC) #12
Randy Smith (Not in Mondays)
9 years, 3 months ago (2011-09-20 18:26:47 UTC) #13
On 2011/09/20 18:22:32, ahendrickson wrote:
> Changes from PS14->15 LGTM.
> 
> Note: I couldn't open any of the links to the failing builds.

Argg.  For some reason the initial % of the %20s was replaced by a %25.  I'll
try repasting them here, but they may just be unusual with this transformation:

http://build.chromium.org/p/chromium/builders/XP%20Tests%20%281%29/builds/7730
http://build.chromium.org/p/chromium/builders/Vista%20Tests%20%281%29/builds/...
http://build.chromium.org/p/chromium/builders/XP%20Tests%20%28dbg%29%285%29/b...
http://build.chromium.org/p/chromium/builders/Vista%20Tests%20%28dbg%29%284%2...
http://build.chromium.org/p/chromium/builders/Vista%20Tests%20%28dbg%29%285%2...


> 
> Andy
> 
> On 2011/09/20 15:50:53, rdsmith wrote:
> > Andy, PTAL?  I'd recommend you look at the PS14->15 changes; 13->14 was just
> the
> > merge up to LKGR.  I don't believe anyone else needs to do a re-review.  I'd
> > welcome a drive-by from Pawel on these if he has the bandwidth, but I'm not
> > going to ask because I'm not sure he does.
> > 
> > This change was landed, and then immediately reverted because it showed up
> > failures on the main waterfall that hadn't shown up in try runs.  I've tried
> to
> > adapt to what I believe those failures are (I'm working a bit blind here). 
> > Links to failing builds:
> > 
> >
>
http://build.chromium.org/p/chromium/builders/XP%252520Tests%252520%2525281%2...
> >
>
http://build.chromium.org/p/chromium/builders/Vista%252520Tests%252520%252528...
> >
>
http://build.chromium.org/p/chromium/builders/XP%252520Tests%252520%252528dbg...
> >
>
http://build.chromium.org/p/chromium/builders/Vista%252520Tests%252520%252528...
> >
>
http://build.chromium.org/p/chromium/builders/Vista%252520Tests%252520%252528...
> > 
> > My conclusion on the problems with interrupts were that the failure from the
> > URLRequestJob hadn't had a chance to propagate through the system, so I put
in
> > infrastructure to chase it through from the IO thread.  My conclusion on the
> > 65535 error from the shell dialogs check was that the shell dialog hadn't
had
> a
> > chance to be created before the test was terminated; rather than try to fix
> that
> > race, I interposed a delegate that behaves properly (for the individual
test)
> > but doesn't throw up a file selection dialog.

Powered by Google App Engine
This is Rietveld 408576698