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; |