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

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

Issue 8372073: Merge 8401001 r107836 into branch 912: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: Created 9 years, 1 month 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_file.cc ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_manager.cc
===================================================================
--- content/browser/download/download_file_manager.cc (revision 108294)
+++ content/browser/download/download_file_manager.cc (working copy)
@@ -66,9 +66,8 @@
return;
}
- DownloadId global_id(download_manager, info->download_id);
- DCHECK(GetDownloadFile(global_id) == NULL);
- downloads_[global_id] = download_file.release();
+ DCHECK(GetDownloadFile(info->download_id) == NULL);
+ downloads_[info->download_id] = download_file.release();
// The file is now ready, we can un-pause the request and start saving data.
info->request_handle.ResumeRequest();
@@ -78,7 +77,8 @@
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableMethod(download_manager,
- &DownloadManager::StartDownload, info->download_id));
+ &DownloadManager::StartDownload,
+ info->download_id.local()));
}
DownloadFile* DownloadFileManager::GetDownloadFile(DownloadId global_id) {
@@ -300,7 +300,7 @@
for (std::set<DownloadFile*>::iterator i = to_remove.begin();
i != to_remove.end(); ++i) {
- downloads_.erase(DownloadId((*i)->GetDownloadManager(), (*i)->id()));
+ downloads_.erase((*i)->global_id());
delete *i;
}
}
« no previous file with comments | « content/browser/download/download_file.cc ('k') | content/browser/download/download_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698