Index: chrome/browser/download/download_target_determiner.cc |
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc |
index 99bcd7f1e855e09c96b958c6277aeda025c8f3dd..17bb22dc1343abd0c10acdb89104b50eb8c58335 100644 |
--- a/chrome/browser/download/download_target_determiner.cc |
+++ b/chrome/browser/download/download_target_determiner.cc |
@@ -95,6 +95,7 @@ DownloadTargetDeterminer::DownloadTargetDeterminer( |
is_dangerous_file_(false), |
virtual_path_(initial_virtual_path), |
is_filetype_handled_safely_(false), |
+ hide_file_extension_(false), |
download_(download), |
is_resumption_(download_->GetLastReason() != |
content::DOWNLOAD_INTERRUPT_REASON_NONE && |
@@ -335,7 +336,7 @@ DownloadTargetDeterminer::Result |
} |
void DownloadTargetDeterminer::PromptUserForDownloadPathDone( |
- const base::FilePath& virtual_path) { |
+ const base::FilePath& virtual_path, bool hide_file_extension) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
DVLOG(20) << "User selected path:" << virtual_path.AsUTF8Unsafe(); |
if (virtual_path.empty()) { |
@@ -346,6 +347,7 @@ void DownloadTargetDeterminer::PromptUserForDownloadPathDone( |
virtual_path_ = virtual_path; |
download_prefs_->SetSaveFilePath(virtual_path_.DirName()); |
+ hide_file_extension_ = hide_file_extension; |
DoLoop(); |
} |
@@ -735,6 +737,7 @@ void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf() { |
target_info->intermediate_path = intermediate_path_; |
target_info->mime_type = mime_type_; |
target_info->is_filetype_handled_safely = is_filetype_handled_safely_; |
+ target_info->hide_file_extension = hide_file_extension_; |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
FROM_HERE, base::Bind(completion_callback_, base::Passed(&target_info))); |