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

Issue 9570005: Added callback to DownloadUrl() so we can find download failures. (Closed)

Created:
8 years, 9 months ago by ahendrickson
Modified:
8 years, 9 months ago
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, nkostylev+watch_chromium.org, tbarzic+watch_chromium.org, jam, ajwong+watch_chromium.org, achuith+watch_chromium.org, mihaip+watch_chromium.org, dcheng, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, rdsmith+dwatch_chromium.org, brettw-cc_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, Bernhard Bauer
Visibility:
Public.

Description

Added callback to DownloadUrl() so we can find download failures where the download item isn't created at all. Added observer class for browser tests, which uses the callback. BUG=117033 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126251

Patch Set 1 #

Patch Set 2 : Merged with trunk #

Total comments: 13

Patch Set 3 : Added test that uses DownloadTestItemCreationObserver. #

Patch Set 4 : Fixed CLANG issue #

Patch Set 5 : Simplified DownloadTestItemCreationObserver so it only checks for one download. #

Patch Set 6 : Merged with parent #

Total comments: 4

Patch Set 7 : Moved callback creation to the callback() function. #

Patch Set 8 : Added thread checks. #

Total comments: 6

Patch Set 9 : Added missing callbacks for starting a download. #

Patch Set 10 : Added more callbacks for downloads. Fixed bug. #

Patch Set 11 : Merged with parent. #

Patch Set 12 : Fixed CLANG issue. #

Total comments: 27

Patch Set 13 : Changes per Randy & Chris' comments. #

Patch Set 14 : Merged with parent. #

Patch Set 15 : Merged with parent. #

Total comments: 2

Patch Set 16 : Merged with parent. #

Patch Set 17 : Changes per Randy's comments. #

Total comments: 1

Patch Set 18 : Merged with parent. #

Patch Set 19 : Merged with trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -50 lines) Patch
M chrome/browser/chromeos/imageburner/burn_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 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 15 16 17 5 chunks +27 lines, -4 lines 0 comments Download
M chrome/browser/download/download_test_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +40 lines, -0 lines 0 comments Download
M chrome/browser/download/download_test_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/browser/extensions/webstore_installer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/download/download_file_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -5 lines 0 comments Download
M content/browser/download/download_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +18 lines, -15 lines 0 comments Download
M content/browser/download/download_resource_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +26 lines, -7 lines 0 comments Download
M content/browser/download/drag_download_file.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +16 lines, -2 lines 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/download_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +8 lines, -1 line 0 comments Download
M content/test/mock_download_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -7 lines 0 comments Download

Messages

Total messages: 46 (0 generated)
ahendrickson
8 years, 9 months ago (2012-03-01 14:14:18 UTC) #1
Randy Smith (Not in Mondays)
Ben, could you take a look at this as well? This is more solidly in ...
8 years, 9 months ago (2012-03-01 16:50:11 UTC) #2
benjhayden
http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h#newcode205 chrome/browser/download/download_test_observer.h:205: class DownloadTestItemCreationObserver This doesn't appear to be used in ...
8 years, 9 months ago (2012-03-01 19:48:53 UTC) #3
ahendrickson
http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h#newcode205 chrome/browser/download/download_test_observer.h:205: class DownloadTestItemCreationObserver On 2012/03/01 19:48:53, benjhayden_chromium wrote: > This ...
8 years, 9 months ago (2012-03-01 21:15:01 UTC) #4
Randy Smith (Not in Mondays)
High level comments (header file and class creation); will hold off on more detailed review ...
8 years, 9 months ago (2012-03-01 21:17:24 UTC) #5
ahendrickson
http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h#newcode204 chrome/browser/download/download_test_observer.h:204: // or that an error occurred and it won't ...
8 years, 9 months ago (2012-03-02 17:34:39 UTC) #6
ahendrickson
PTAL
8 years, 9 months ago (2012-03-02 19:25:42 UTC) #7
cbentzel
What is the failure you are trying to find? There should be a bug associated ...
8 years, 9 months ago (2012-03-02 20:13:05 UTC) #8
ahendrickson
On 2012/03/02 20:13:05, cbentzel wrote: > What is the failure you are trying to find? ...
8 years, 9 months ago (2012-03-02 20:16:46 UTC) #9
cbentzel
Is this for testing use only? It doesn't look like any runtime code is providing ...
8 years, 9 months ago (2012-03-02 20:18:52 UTC) #10
benjhayden
lgtm http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h#newcode236 chrome/browser/download/download_test_observer.h:236: return callback_; On 2012/03/01 21:15:01, ahendrickson wrote: > ...
8 years, 9 months ago (2012-03-02 20:27:14 UTC) #11
cbentzel
Don't forget that you will need jam's review for the public change? I don't really ...
8 years, 9 months ago (2012-03-02 20:32:21 UTC) #12
cbentzel
This seems fine for this particular case. I do wish we had a better mechanism ...
8 years, 9 months ago (2012-03-02 21:00:17 UTC) #13
benjhayden
On Fri, Mar 2, 2012 at 4:00 PM, <cbentzel@chromium.org> wrote: > This seems fine for ...
8 years, 9 months ago (2012-03-02 21:05:45 UTC) #14
cbentzel
On Fri, Mar 2, 2012 at 4:05 PM, Ben Hayden <benjhayden@chromium.org> wrote: > > > ...
8 years, 9 months ago (2012-03-02 21:11:21 UTC) #15
ahendrickson
On 2012/03/02 20:18:52, cbentzel wrote: > Is this for testing use only? It doesn't look ...
8 years, 9 months ago (2012-03-02 21:43:15 UTC) #16
ahendrickson
On 2012/03/02 20:32:21, cbentzel wrote: > Don't forget that you will need jam's review for ...
8 years, 9 months ago (2012-03-02 21:45:03 UTC) #17
ahendrickson
On 2012/03/02 21:45:03, ahendrickson wrote: > On 2012/03/02 20:32:21, cbentzel wrote: > > Don't forget ...
8 years, 9 months ago (2012-03-02 21:49:11 UTC) #18
ahendrickson
http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h File chrome/browser/download/download_test_observer.h (right): http://codereview.chromium.org/9570005/diff/3001/chrome/browser/download/download_test_observer.h#newcode236 chrome/browser/download/download_test_observer.h:236: return callback_; On 2012/03/02 20:27:16, benjhayden_chromium wrote: > On ...
8 years, 9 months ago (2012-03-02 21:51:41 UTC) #19
Randy Smith (Not in Mondays)
Quick high level response to the comment thread: This CL is in response to a ...
8 years, 9 months ago (2012-03-06 16:25:19 UTC) #20
Randy Smith (Not in Mondays)
On 2012/03/06 16:25:19, rdsmith wrote: > Quick high level response to the comment thread: This ...
8 years, 9 months ago (2012-03-06 16:25:55 UTC) #21
Randy Smith (Not in Mondays)
http://codereview.chromium.org/9570005/diff/3001/content/browser/download/download_resource_handler.h File content/browser/download/download_resource_handler.h (right): http://codereview.chromium.org/9570005/diff/3001/content/browser/download/download_resource_handler.h#newcode37 content/browser/download/download_resource_handler.h:37: typedef content::DownloadManager::OnStartedCallback OnStartedCallback; On 2012/03/02 17:34:39, ahendrickson wrote: > ...
8 years, 9 months ago (2012-03-06 21:29:14 UTC) #22
ahendrickson
http://codereview.chromium.org/9570005/diff/11009/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): http://codereview.chromium.org/9570005/diff/11009/content/public/browser/download_manager.h#newcode182 content/public/browser/download_manager.h:182: // occurs. On 2012/03/06 21:29:14, rdsmith wrote: > You ...
8 years, 9 months ago (2012-03-06 22:01:36 UTC) #23
ahendrickson
http://codereview.chromium.org/9570005/diff/11009/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/9570005/diff/11009/chrome/browser/download/download_browsertest.cc#newcode726 chrome/browser/download/download_browsertest.cc:726: EXPECT_EQ(download_info.show_download_item, creation_observer->started()); On 2012/03/06 21:29:14, rdsmith wrote: > As ...
8 years, 9 months ago (2012-03-07 02:58:12 UTC) #24
Randy Smith (Not in Mondays)
http://codereview.chromium.org/9570005/diff/28001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/9570005/diff/28001/chrome/browser/download/download_browsertest.cc#newcode720 chrome/browser/download/download_browsertest.cc:720: EXPECT_EQ(download_info.show_download_item, creation_observer->started()); Don't use mean ->succeeded() here? started() will ...
8 years, 9 months ago (2012-03-07 21:16:56 UTC) #25
Randy Smith (Not in Mondays)
You may also want to pull someone else in (Ricardo?) to run their eye over ...
8 years, 9 months ago (2012-03-07 21:19:16 UTC) #26
jstritar
http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h#newcode184 content/public/browser/download_manager.h:184: // occurs. On 2012/03/07 21:16:57, rdsmith wrote: > This ...
8 years, 9 months ago (2012-03-07 21:34:39 UTC) #27
cbentzel
On 2012/03/07 21:34:39, jstritar wrote: > http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h > File content/public/browser/download_manager.h (right): > > http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h#newcode184 > ...
8 years, 9 months ago (2012-03-08 17:36:44 UTC) #28
jstritar
On 2012/03/08 17:36:44, cbentzel wrote: > On 2012/03/07 21:34:39, jstritar wrote: > > > http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h ...
8 years, 9 months ago (2012-03-08 17:54:24 UTC) #29
Randy Smith (Not in Mondays)
On 2012/03/08 17:54:24, jstritar wrote: > On 2012/03/08 17:36:44, cbentzel wrote: > > On 2012/03/07 ...
8 years, 9 months ago (2012-03-08 17:57:11 UTC) #30
cbentzel
On 2012/03/08 17:54:24, jstritar wrote: > On 2012/03/08 17:36:44, cbentzel wrote: > > On 2012/03/07 ...
8 years, 9 months ago (2012-03-08 17:57:23 UTC) #31
cbentzel
This looks fine. I'll remove myself from the reviewers list since Randy etc. should be ...
8 years, 9 months ago (2012-03-08 17:58:48 UTC) #32
jstritar
Oh, in that case maybe we just need to clarify the documentation.
8 years, 9 months ago (2012-03-08 17:59:06 UTC) #33
cbentzel
On 2012/03/08 17:57:23, cbentzel wrote: > On 2012/03/08 17:54:24, jstritar wrote: > > On 2012/03/08 ...
8 years, 9 months ago (2012-03-08 17:59:31 UTC) #34
ahendrickson
http://codereview.chromium.org/9570005/diff/28001/chrome/browser/download/download_browsertest.cc File chrome/browser/download/download_browsertest.cc (right): http://codereview.chromium.org/9570005/diff/28001/chrome/browser/download/download_browsertest.cc#newcode720 chrome/browser/download/download_browsertest.cc:720: EXPECT_EQ(download_info.show_download_item, creation_observer->started()); On 2012/03/07 21:16:57, rdsmith wrote: > Don't ...
8 years, 9 months ago (2012-03-08 21:33:07 UTC) #35
ahendrickson
brettw: PTAL at chrome/browser/extensions, chrome/browser/tab_contents, content/browser/renderer_host and content/browser/tab_contents. I'm just adding empty callbacks to DownloadURL().
8 years, 9 months ago (2012-03-08 21:44:12 UTC) #36
Randy Smith (Not in Mondays)
On 2012/03/08 21:44:12, ahendrickson wrote: > brettw: PTAL at chrome/browser/extensions, chrome/browser/tab_contents, > content/browser/renderer_host and content/browser/tab_contents. ...
8 years, 9 months ago (2012-03-09 18:57:37 UTC) #37
Randy Smith (Not in Mondays)
Almost there--I'd like to understand the url_request.h change a bit better, and I'm not sure ...
8 years, 9 months ago (2012-03-09 19:14:01 UTC) #38
ahendrickson
http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): http://codereview.chromium.org/9570005/diff/28001/content/public/browser/download_manager.h#newcode184 content/public/browser/download_manager.h:184: // occurs. On 2012/03/09 19:14:02, rdsmith wrote: > On ...
8 years, 9 months ago (2012-03-09 20:50:08 UTC) #39
cbentzel
On 2012/03/09 19:14:01, rdsmith wrote: > Almost there--I'd like to understand the url_request.h change a ...
8 years, 9 months ago (2012-03-09 21:15:19 UTC) #40
ahendrickson
On 2012/03/09 21:15:19, cbentzel wrote: > On 2012/03/09 19:14:01, rdsmith wrote: > > Almost there--I'd ...
8 years, 9 months ago (2012-03-09 21:33:42 UTC) #41
brettw
LGTM rubberstamp, didn't check the details. http://codereview.chromium.org/9570005/diff/54001/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): http://codereview.chromium.org/9570005/diff/54001/content/public/browser/download_manager.h#newcode185 content/public/browser/download_manager.h:185: // occurs that ...
8 years, 9 months ago (2012-03-09 22:53:42 UTC) #42
ahendrickson
rdsmith, PTAL.
8 years, 9 months ago (2012-03-12 12:01:28 UTC) #43
Randy Smith (Not in Mondays)
LGTM; thanks.
8 years, 9 months ago (2012-03-12 18:01:04 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ahendrickson@chromium.org/9570005/50005
8 years, 9 months ago (2012-03-12 18:52:09 UTC) #45
commit-bot: I haz the power
8 years, 9 months ago (2012-03-12 22:51:39 UTC) #46
Change committed as 126251

Powered by Google App Engine
This is Rietveld 408576698