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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_util.cc

Issue 666693004: Stop fallback for empty local path in ui::SelectedFileInfo's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 6 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
« no previous file with comments | « no previous file | ui/shell_dialogs/select_file_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
index a97f16dc34530651d305896132f5d8447e9a3510..a12bfe31043b43f559e7a823b60f269940ca9eba 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
@@ -119,7 +119,10 @@ void GetSelectedFileInfoInternal(Profile* profile,
// MTP, or provided file system), we should resolve the path.
switch (params->local_path_option) {
case NO_LOCAL_PATH_RESOLUTION:
- break; // No special handling needed.
+ // Pass empty local path.
+ params->selected_files.push_back(
+ ui::SelectedFileInfo(file_path, base::FilePath()));
+ break;
case NEED_LOCAL_PATH_FOR_OPENING:
GetFileNativeLocalPathForOpening(
profile,
@@ -137,9 +140,10 @@ void GetSelectedFileInfoInternal(Profile* profile,
base::Passed(&params)));
return; // Remaining work is done in ContinueGetSelectedFileInfo.
}
+ } else {
+ params->selected_files.push_back(
+ ui::SelectedFileInfo(file_path, file_path));
}
- params->selected_files.push_back(
- ui::SelectedFileInfo(file_path, base::FilePath()));
}
params->callback.Run(params->selected_files);
}
« no previous file with comments | « no previous file | ui/shell_dialogs/select_file_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698