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

Unified Diff: chrome/browser/chromeos/file_manager/url_util.cc

Issue 1701163003: Hide non-native volumes when saving files from the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 10 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 | chrome/browser/chromeos/file_manager/url_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/url_util.cc
diff --git a/chrome/browser/chromeos/file_manager/url_util.cc b/chrome/browser/chromeos/file_manager/url_util.cc
index 1174628813b93dac99e3579e88f582afcdaff38e..e8f8bd67980e0b6507d60c0531de57dd554ca59e 100644
--- a/chrome/browser/chromeos/file_manager/url_util.cc
+++ b/chrome/browser/chromeos/file_manager/url_util.cc
@@ -15,7 +15,10 @@ namespace file_manager {
namespace util {
namespace {
-const char kShouldReturnLocalPath[] = "shouldReturnLocalPath";
+const char kAllowedPaths[] = "allowedPaths";
+const char kNativePath[] = "nativePath";
+const char kNativeOrDrivePath[] = "nativeOrDrivePath";
+const char kAnyPath[] = "anyPath";
// Returns a file manager URL for the given |path|.
GURL GetFileManagerUrl(const char* path) {
@@ -111,22 +114,20 @@ GURL GetFileManagerMainPageUrlWithParams(
// If the caller cannot handle Drive path, the file chooser dialog need to
// return resolved local native paths to the selected files.
- // TODO(hirono): Turns the boolean into enum to pass support virtual path info
- // to Javascript.
if (file_types) {
switch (file_types->allowed_paths) {
case ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH:
- arg_value.SetBoolean(kShouldReturnLocalPath, true);
+ arg_value.SetString(kAllowedPaths, kNativePath);
break;
case ui::SelectFileDialog::FileTypeInfo::NATIVE_OR_DRIVE_PATH:
- arg_value.SetBoolean(kShouldReturnLocalPath, false);
+ arg_value.SetString(kAllowedPaths, kNativeOrDrivePath);
break;
case ui::SelectFileDialog::FileTypeInfo::ANY_PATH:
- arg_value.SetBoolean(kShouldReturnLocalPath, false);
+ arg_value.SetString(kAllowedPaths, kAnyPath);
break;
}
} else {
- arg_value.SetBoolean(kShouldReturnLocalPath, true);
+ arg_value.SetString(kAllowedPaths, kNativePath);
}
std::string json_args;
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_manager/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698