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

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

Issue 3581008: Fix instances of passing raw pointers to RefCounted objects in tasks. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Merge Created 10 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: chrome/browser/download/download_file_manager.cc
diff --git a/chrome/browser/download/download_file_manager.cc b/chrome/browser/download/download_file_manager.cc
index fc94314139d4c9eeec00764dc0e32fd13bb8a4c2..10fe2fe93f0830e155f93d90b60895426bebf337 100644
--- a/chrome/browser/download/download_file_manager.cc
+++ b/chrome/browser/download/download_file_manager.cc
@@ -174,9 +174,13 @@ void DownloadFileManager::StartDownload(DownloadCreateInfo* info) {
return;
}
- ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,
- NewRunnableMethod(this, &DownloadFileManager::CreateDownloadFile,
- info, manager));
+ ChromeThread::PostTask(
+ ChromeThread::FILE,
+ FROM_HERE,
+ NewRunnableMethod(this,
+ &DownloadFileManager::CreateDownloadFile,
+ info,
+ make_scoped_refptr(manager)));
}
// We don't forward an update to the UI thread here, since we want to throttle
« no previous file with comments | « chrome/browser/debugger/devtools_http_protocol_handler.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698