Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1193)

Unified Diff: chrome/browser/download/download_file_picker.cc

Issue 2453633006: [downloads] Move platform specific code out of DownloadTargetDeterminer. (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/download/download_file_picker.cc
diff --git a/chrome/browser/download/download_file_picker.cc b/chrome/browser/download/download_file_picker.cc
index 1e625ba63eee4360d3f5e37f5310d53166862580..f12b144d2d3fb2501d668270b54bc59e76fc3451 100644
--- a/chrome/browser/download/download_file_picker.cc
+++ b/chrome/browser/download/download_file_picker.cc
@@ -96,7 +96,10 @@ DownloadFilePicker::~DownloadFilePicker() {
void DownloadFilePicker::OnFileSelected(const base::FilePath& path) {
if (should_record_file_picker_result_)
RecordFilePickerResult(suggested_path_, path);
- file_selected_callback_.Run(path);
+ file_selected_callback_.Run(path.empty()
+ ? DownloadConfirmationResult::CANCELED
+ : DownloadConfirmationResult::CONFIRMED,
+ path);
delete this;
}

Powered by Google App Engine
This is Rietveld 408576698