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

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

Issue 11068027: OnDownloadStarted takes DownloadItem* instead of DownloadId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index bfd5ac0be555b9f4c8c8360750e5d13c4c95b338..74c15d109b1c8ca55ad0295616a7eab278ee60ab 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -344,7 +344,7 @@ bool DownloadManagerImpl::Init(content::BrowserContext* browser_context) {
}
// We have received a message from DownloadFileManager about a new download.
-content::DownloadId DownloadManagerImpl::StartDownload(
+DownloadItem* DownloadManagerImpl::StartDownload(
scoped_ptr<DownloadCreateInfo> info,
scoped_ptr<content::ByteStreamReader> stream) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -376,7 +376,7 @@ content::DownloadId DownloadManagerImpl::StartDownload(
(delegate_ && delegate_->GenerateFileHash()), bound_net_log,
callback));
- return download_id;
+ return GetDownload(download_id.local());
Randy Smith (Not in Mondays) 2012/10/08 19:20:52 I think that it would be a better design to refact
benjhayden 2012/10/08 19:49:45 Ya, I thought about making CreateDownloadItem retu
}
void DownloadManagerImpl::OnDownloadFileCreated(

Powered by Google App Engine
This is Rietveld 408576698