summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 06:40:54 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 06:40:54 +0000
commitdc7cdcb970254f223262a66c812f240a8269ae87 (patch)
tree733c645e32f52bc25bf0c6ac787bd0a2bb8a4e95 /chrome/browser/download/download_manager.cc
parentedf82bb47393c99f1326a7a0fe8a2192e68d8dc9 (diff)
downloadchromium_src-dc7cdcb970254f223262a66c812f240a8269ae87.zip
chromium_src-dc7cdcb970254f223262a66c812f240a8269ae87.tar.gz
chromium_src-dc7cdcb970254f223262a66c812f240a8269ae87.tar.bz2
Reland part of r62043 that got reverted.
I tried to repro this bug and could not. Seems to work. BUG=58553,28083 TEST=python chrome/test/functional/cookies.py cookies.CookiesTest.testCookiesFile Review URL: http://codereview.chromium.org/5721007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r--chrome/browser/download/download_manager.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 0a04877..362a74d 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -80,7 +80,7 @@ void DownloadManager::Shutdown() {
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(file_manager_,
&DownloadFileManager::OnDownloadManagerShutdown,
- this));
+ make_scoped_refptr(this)));
}
AssertContainersConsistent();
@@ -448,7 +448,8 @@ void DownloadManager::CreateDownloadItem(DownloadCreateInfo* info,
BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
file_manager_, &DownloadFileManager::OnFinalDownloadName,
- download->id(), target_path, !info->is_dangerous, this));
+ download->id(), target_path, !info->is_dangerous,
+ make_scoped_refptr(this)));
} else {
// The download hasn't finished and it is a safe download. We need to
// rename it to its intermediate '.crdownload' path.
@@ -457,7 +458,7 @@ void DownloadManager::CreateDownloadItem(DownloadCreateInfo* info,
BrowserThread::FILE, FROM_HERE,
NewRunnableMethod(
file_manager_, &DownloadFileManager::OnIntermediateDownloadName,
- download->id(), download_path, this));
+ download->id(), download_path, make_scoped_refptr(this)));
download->Rename(download_path);
}