| Index: content/browser/download/download_item_impl_delegate.cc
|
| diff --git a/content/browser/download/download_item_impl_delegate.cc b/content/browser/download/download_item_impl_delegate.cc
|
| index 96be706eee0373c3021b95ce2b80db0f08bea110..4a60d2f0fd12a3a6c062ca7e6deae37d802fb8e3 100644
|
| --- a/content/browser/download/download_item_impl_delegate.cc
|
| +++ b/content/browser/download/download_item_impl_delegate.cc
|
| @@ -29,8 +29,10 @@ void DownloadItemImplDelegate::Detach() {
|
|
|
| void DownloadItemImplDelegate::DetermineDownloadTarget(
|
| DownloadItemImpl* download, const DownloadTargetCallback& callback) {
|
| - // TODO(rdsmith/asanka): Do something useful if forced file path is null.
|
| - base::FilePath target_path(download->GetForcedFilePath());
|
| + // TODO(qinmin): Do something useful if both forced file path and
|
| + // target file path are null.
|
| + base::FilePath target_path = download->GetForcedFilePath().empty() ?
|
| + download->GetTargetFilePath() : download->GetForcedFilePath();
|
| callback.Run(target_path,
|
| DownloadItem::TARGET_DISPOSITION_OVERWRITE,
|
| DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
|
|
|