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

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

Issue 8401001: Fix history importing by delaying DownloadManager creation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix ifndefs Created 9 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
« 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
diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc
index 80e6f17dab886aefc6999ce218963dbb4bef23a4..829cab9574981a6798665d55d6629ae3db74f3a5 100644
--- a/content/browser/download/download_file_manager.cc
+++ b/content/browser/download/download_file_manager.cc
@@ -70,9 +70,8 @@ void DownloadFileManager::CreateDownloadFile(
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.
request_handle.ResumeRequest();
@@ -82,7 +81,7 @@ void DownloadFileManager::CreateDownloadFile(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&DownloadManager::StartDownload, download_manager,
- info->download_id));
+ info->download_id.local()));
}
DownloadFile* DownloadFileManager::GetDownloadFile(DownloadId global_id) {
@@ -280,7 +279,7 @@ void DownloadFileManager::OnDownloadManagerShutdown(DownloadManager* manager) {
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