Bug 722868 - Part 2: Make the download manager aware of the deleteTemporaryPrivateFileWhenPossible API; r=gavin

This commit is contained in:
Ehsan Akhgari 2012-04-24 23:01:35 -04:00
Родитель 2ba15a514f
Коммит b03ad8e3e7
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -2879,8 +2879,13 @@ nsDownload::OpenWithApplication()
// Even if we are unable to get this service we return the result
// of LaunchWithFile() which makes more sense.
if (appLauncher)
(void)appLauncher->DeleteTemporaryFileOnExit(target);
if (appLauncher) {
if (nsDownloadManager::gDownloadManagerService->mInPrivateBrowsing) {
(void)appLauncher->DeleteTemporaryPrivateFileWhenPossible(target);
} else {
(void)appLauncher->DeleteTemporaryFileOnExit(target);
}
}
}
return retVal;