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

Issue 7294013: Modified cancel and interrupt processing to avoid race with history. (Closed)

Created:
9 years, 5 months ago by Randy Smith (Not in Mondays)
Modified:
9 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, kkania, jam, achuith+watch_chromium.org, joi+watch-content_chromium.org, rginda+watch_chromium.org, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Modified cancel and interrupt processing to avoid race with history. Avoid racing with the history callback by unilaterally removing DownloadItem from queues on cancel/interrupt. This keeps the state<->queue correspondence cleaner, and avoids leaving things on queues during shutdown. It might also fix 85408; we'll see :-}. BUG=85408 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92870

Patch Set 1 #

Total comments: 50

Patch Set 2 : Incorporated comments from self-review. #

Patch Set 3 : Fixed various problems surfaced by trybots. #

Total comments: 24

Patch Set 4 : Incorporated comments, fixed some stuff from try jobs. #

Total comments: 10

Patch Set 5 : Incorporated last round of comments. #

Patch Set 6 : Mocked out select file dialog. #

Patch Set 7 : Incoporated Andy's comments. #

Patch Set 8 : Hack to fix chromeos run. #

Patch Set 9 : Final upload ready for commit. #

Patch Set 10 : Merged to TOT. #

Patch Set 11 : Fixed copyright notice. #

Patch Set 12 : Merged to TOT. Again :-}. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+776 lines, -299 lines) Patch
M chrome/browser/automation/automation_provider_observers.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 2 3 4 5 6 7 8 20 chunks +521 lines, -143 lines 0 comments Download
M chrome/browser/download/download_file_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_history.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_history.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/download/download_item.h View 1 2 3 4 5 3 chunks +15 lines, -12 lines 0 comments Download
M chrome/browser/download/download_item.cc View 1 2 3 4 5 6 4 chunks +57 lines, -20 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/download/download_manager.h View 1 2 3 4 5 5 chunks +31 lines, -11 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 4 5 6 7 8 9 13 chunks +68 lines, -72 lines 0 comments Download
M chrome/browser/download/download_manager_unittest.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/download/download_request_handle.h View 1 2 3 4 5 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/download/download_util.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_controller.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/download/download_item_gtk.cc View 1 2 3 4 5 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 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/active_downloads_ui.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/downloads_dom_handler.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A chrome/test/data/download-dangerous.jar View Binary file 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/save_package.cc View 1 2 3 4 5 6 7 8 9 10 11 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 9 10 3 chunks +12 lines, -5 lines 0 comments Download
M content/browser/net/url_request_slow_download_job.cc View 1 2 3 4 8 chunks +36 lines, -15 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Randy Smith (Not in Mondays)
http://codereview.chromium.org/7294013/diff/1/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/7294013/diff/1/chrome/browser/download/download_browsertest.cc#newcode1053 chrome/browser/download/download_browsertest.cc:1053: // Put up a Select File dialog when the ...
9 years, 5 months ago (2011-06-30 23:05:13 UTC) #1
Randy Smith (Not in Mondays)
Incorporated comments from self-review. http://codereview.chromium.org/7294013/diff/1/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/7294013/diff/1/chrome/browser/download/download_browsertest.cc#newcode1053 chrome/browser/download/download_browsertest.cc:1053: // Put up a Select ...
9 years, 5 months ago (2011-07-05 20:28:43 UTC) #2
Randy Smith (Not in Mondays)
PTAL: * Andy: Primary reviewer (Pawel's off, so go through it carefully). * Ben: For ...
9 years, 5 months ago (2011-07-05 21:48:10 UTC) #3
willchan no longer on Chromium
I'm a bit overloaded right now, replacing myself with eroman in hopes he can get ...
9 years, 5 months ago (2011-07-06 06:20:46 UTC) #4
brettw
http://codereview.chromium.org/7294013/diff/9002/content/browser/net/url_request_slow_download_job.cc File content/browser/net/url_request_slow_download_job.cc (right): http://codereview.chromium.org/7294013/diff/9002/content/browser/net/url_request_slow_download_job.cc#newcode34 content/browser/net/url_request_slow_download_job.cc:34: // Return whether this is the finish or error ...
9 years, 5 months ago (2011-07-06 16:44:13 UTC) #5
benjhayden
2 nits but LGTM. http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_history.cc File chrome/browser/download/download_history.cc (right): http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_history.cc#newcode125 chrome/browser/download/download_history.cc:125: if (db_handle <= kUninitializedHandle) Do ...
9 years, 5 months ago (2011-07-06 18:12:06 UTC) #6
eroman
lgtm for content/browser/net/* http://codereview.chromium.org/7294013/diff/9002/content/browser/net/url_request_slow_download_job.cc File content/browser/net/url_request_slow_download_job.cc (right): http://codereview.chromium.org/7294013/diff/9002/content/browser/net/url_request_slow_download_job.cc#newcode38 content/browser/net/url_request_slow_download_job.cc:38: LowerCaseEqualsASCII( Why use lowercase URL comparison ...
9 years, 5 months ago (2011-07-06 22:19:01 UTC) #7
Randy Smith (Not in Mondays)
Next round; PTAL. Added Achuith for perspective on the correct arguments to CheckDownloadUI() for the ...
9 years, 5 months ago (2011-07-07 22:02:23 UTC) #8
achuithb
On 2011/07/07 22:02:23, rdsmith wrote: > Next round; PTAL. > > Added Achuith for perspective ...
9 years, 5 months ago (2011-07-08 19:21:50 UTC) #9
brettw
content LGTM (didn't check the details). http://codereview.chromium.org/7294013/diff/16001/content/browser/net/url_request_slow_download_job.cc File content/browser/net/url_request_slow_download_job.cc (right): http://codereview.chromium.org/7294013/diff/16001/content/browser/net/url_request_slow_download_job.cc#newcode35 content/browser/net/url_request_slow_download_job.cc:35: static bool IsCompletionUrl(GURL ...
9 years, 5 months ago (2011-07-08 19:48:22 UTC) #10
ahendrickson
LGTM, with minor issues. http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_item.cc#newcode346 chrome/browser/download/download_item.cc:346: CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); Could you add a ...
9 years, 5 months ago (2011-07-11 20:05:48 UTC) #11
Randy Smith (Not in Mondays)
I've incoporated all comments and gotten all LGTMs, so everyone's done unless I have to ...
9 years, 5 months ago (2011-07-13 21:11:38 UTC) #12
Randy Smith (Not in Mondays)
I'd like to request one more round of review, primarily from Andy (downloads expert) and ...
9 years, 5 months ago (2011-07-14 19:03:23 UTC) #13
achuithb
I didn't look at the CheckDownloadUI calls in detail, but they look ok. I don't ...
9 years, 5 months ago (2011-07-14 22:00:43 UTC) #14
Randy Smith (Not in Mondays)
On 2011/07/14 22:00:43, achuith.bhandarkar wrote: > I didn't look at the CheckDownloadUI calls in detail, ...
9 years, 5 months ago (2011-07-15 19:59:20 UTC) #15
ahendrickson
Still LGTM.
9 years, 5 months ago (2011-07-15 20:09:57 UTC) #16
Randy Smith (Not in Mondays)
Incorporated missed comments from Andy. Waiting for LGTM from Brett. http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_item.cc File chrome/browser/download/download_item.cc (right): http://codereview.chromium.org/7294013/diff/9002/chrome/browser/download/download_item.cc#newcode346 ...
9 years, 5 months ago (2011-07-15 20:49:08 UTC) #17
achuith
The download will be shown in the download panel during the download and it has ...
9 years, 5 months ago (2011-07-15 21:08:59 UTC) #18
brettw
LGTM rubberstamp
9 years, 5 months ago (2011-07-15 22:36:41 UTC) #19
Randy Smith (Not in Mondays)
On 2011/07/15 21:08:59, achuith wrote: > The download will be shown in the download panel ...
9 years, 5 months ago (2011-07-17 21:03:24 UTC) #20
Randy Smith (Not in Mondays)
On 2011/07/17 21:03:24, rdsmith wrote: > On 2011/07/15 21:08:59, achuith wrote: > > The download ...
9 years, 5 months ago (2011-07-17 21:04:21 UTC) #21
achuithb
> > Achuith: Could you take a look at the latest patch set and the ...
9 years, 5 months ago (2011-07-17 23:17:36 UTC) #22
Randy Smith (Not in Mondays)
This is the final version which I'll commit from (modulo syncing up to TOT, which ...
9 years, 5 months ago (2011-07-18 01:38:23 UTC) #23
commit-bot: I haz the power
Failed to request the patch to try. Please note that binary filesare still unsupported at ...
9 years, 5 months ago (2011-07-18 17:15:12 UTC) #24
Randy Smith (Not in Mondays)
9 years, 3 months ago (2011-09-10 01:17:11 UTC) #25
I've regenerated this CL at http://codereview.chromium.org/7796014 and am
closing this one; interested folks are welcome to follow the pointer.  (I came
up with a smaller review list for that CL than this one had, but anyone who
wants to review it is welcome to.)

Powered by Google App Engine
This is Rietveld 408576698