Chromium Code Reviews| 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..272d241f1af959fbc33f5a4d6c2cd1d5d6ea053e 100644 |
| --- a/content/browser/download/download_item_impl_delegate.cc |
| +++ b/content/browser/download/download_item_impl_delegate.cc |
| @@ -29,8 +29,11 @@ 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 empty. This code path is unreachable. It's |
| + // here because we cannot rely on embedder to replace the implementation. |
| + base::FilePath target_path = download->GetForcedFilePath().empty() ? |
|
asanka
2017/01/10 22:24:03
The changes in this file are not necessary. The la
qinmin
2017/01/10 23:04:42
ok, reverted the change
|
| + download->GetTargetFilePath() : download->GetForcedFilePath(); |
| callback.Run(target_path, |
| DownloadItem::TARGET_DISPOSITION_OVERWRITE, |
| DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, |