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

Issue 114193009: [Download] Return DownloadInterruptReason from OnStartedCallback (Closed)

Created:
7 years ago by asanka
Modified:
6 years, 11 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, dgrogan, benjhayden+dwatch_chromium.org, alecflett, jam, dcheng, joi+watch-content_chromium.org, stuartmorgan+watch_chromium.org, cmumford, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

[Download] Return DownloadInterruptReason from OnStartedCallback DownloadUrlParameters::OnStartedCallback is invoked when the server response is received for a newly started download. If there's an error, this callback used to receive a net::Error indicating why. This CL changes the return value to a DownloadInterruptReason so that the callback can indicate error conditions that affect downloads that aren't considered errors at the network layer. Also, it avoids having to call DownloadManager::Start() when the response indicates that a download is not possible. Currently downloads that fail to start return a net::Error, but those that fail after starting return a DownloadInterruptReason. With this change, all downloads will return a DownloadInterruptReason regardless of when the download is interrupted. BUG=7648 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244657

Patch Set 1 : #

Patch Set 2 : Try again to see if base files make it this time. #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -130 lines) Patch
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_browsertest.cc View 1 2 5 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/download/download_item_model.cc View 1 2 5 chunks +18 lines, -8 lines 0 comments Download
M chrome/browser/download/download_item_model_unittest.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.h View 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.cc View 3 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/extensions/webstore_installer.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/webstore_installer.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/plugins/plugin_installer.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/plugins/plugin_installer.cc View 5 chunks +13 lines, -9 lines 0 comments Download
M chrome/common/extensions/api/downloads.idl View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/download/download_interrupt_reasons_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/download_item_impl.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 3 chunks +8 lines, -10 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/download/download_net_log_parameters.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/download/download_resource_handler.h View 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/download/download_resource_handler.cc View 5 chunks +11 lines, -8 lines 0 comments Download
M content/browser/download/drag_download_file.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/indexed_db/indexed_db_internals_ui.h View 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/indexed_db/indexed_db_internals_ui.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 6 chunks +16 lines, -11 lines 0 comments Download
M content/public/browser/download_interrupt_reason_values.h View 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/browser/download_interrupt_reasons.h View 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/download_url_parameters.h View 3 chunks +5 lines, -4 lines 0 comments Download
M content/public/browser/resource_dispatcher_host.h View 3 chunks +6 lines, -5 lines 0 comments Download
M content/public/test/download_test_observer.h View 3 chunks +8 lines, -5 lines 0 comments Download
M content/public/test/download_test_observer.cc View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
asanka
Ben: Could you take a look? The pertinent changes are in /download/.
7 years ago (2013-12-17 01:45:41 UTC) #1
benjhayden
On 2013/12/17 01:45:41, asanka wrote: > Ben: Could you take a look? The pertinent changes ...
7 years ago (2013-12-17 18:12:52 UTC) #2
benjhayden
LGTM Huh, the unified diffs still work even though the side-by-sides don't.
7 years ago (2013-12-17 18:22:47 UTC) #3
asanka
On 2013/12/17 18:22:47, benjhayden_chromium wrote: > LGTM > > Huh, the unified diffs still work ...
7 years ago (2013-12-17 18:26:05 UTC) #4
asanka
Adding OWNERS. Apologies for the long list: mnaganov: android_webview/ joi: content/public/ simonjam: content/browser/loader/ haven: chrome/browser/extensions/api/image_writer_private/ ...
6 years, 11 months ago (2014-01-09 18:49:27 UTC) #5
Drew Haven
lgtm LGTM for chrome/browser/extensions/api/image_writer_private/
6 years, 11 months ago (2014-01-09 19:34:23 UTC) #6
James Simonsen
lgtm
6 years, 11 months ago (2014-01-09 19:42:05 UTC) #7
Bernhard Bauer
c/b/p LGTM.
6 years, 11 months ago (2014-01-09 19:59:49 UTC) #8
jsbell
content/browser/indexed_db lgtm
6 years, 11 months ago (2014-01-09 21:21:11 UTC) #9
sky
LGTM
6 years, 11 months ago (2014-01-09 21:44:47 UTC) #10
mnaganov (inactive)
android_webview/ LGTM
6 years, 11 months ago (2014-01-10 10:02:10 UTC) #11
Jói
//content/public LGTM
6 years, 11 months ago (2014-01-10 13:03:42 UTC) #12
asargent_no_longer_on_chrome
chrome/browser/extensions/webstore_installer.* chrome/common/extensions/api/downloads.idl lgtm
6 years, 11 months ago (2014-01-10 23:20:58 UTC) #13
asanka
Thanks everyone! dgrogan: ping?
6 years, 11 months ago (2014-01-13 16:46:39 UTC) #14
dgrogan
jsbell lgtm'd for me
6 years, 11 months ago (2014-01-13 16:51:52 UTC) #15
asanka
On 2014/01/13 16:51:52, dgrogan wrote: > jsbell lgtm'd for me Gotcha! Thanks
6 years, 11 months ago (2014-01-13 17:31:01 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/114193009/70001
6 years, 11 months ago (2014-01-13 23:16:58 UTC) #17
commit-bot: I haz the power
6 years, 11 months ago (2014-01-14 06:15:06 UTC) #18
Message was sent while issue was closed.
Change committed as 244657

Powered by Google App Engine
This is Rietveld 408576698