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

Unified Diff: content/browser/download/download_resource_handler.cc

Issue 14955002: [Resumption 6/11] Add a RESUMING_INTERNAL state to DownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index 388bcd1e5a9a2853f21adef2a372f92cbae8dce5..35c6b242d32e7c12e83356613bc52fa83be0b64c 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -65,8 +65,9 @@ static void StartOnUIThread(
DownloadItem* item = download_manager->StartDownload(
info.Pass(), stream.Pass());
+ // |item| can be NULL if the download has been removed.
if (!started_cb.is_null())
- started_cb.Run(item, net::OK);
+ started_cb.Run(item, item ? net::OK : net::ERR_ABORTED);
}
} // namespace
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698