| Index: chrome/browser/extensions/api/file_system/file_system_api.cc
|
| diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| index fee90cba6dd704b109cad4d4ce2121a8485757d8..5e135a2175d92e35266fa0a70a32d814442b8ebb 100644
|
| --- a/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
|
| @@ -50,7 +50,7 @@
|
| #endif
|
|
|
| #if defined(OS_CHROMEOS)
|
| -#include "chrome/browser/chromeos/drive/file_system_util.h"
|
| +#include "chrome/browser/chromeos/file_manager/filesystem_api_util.h"
|
| #endif
|
|
|
| using apps::SavedFileEntry;
|
| @@ -680,13 +680,24 @@ void FileSystemChooseEntryFunction::FilesSelected(
|
| }
|
| content::WebContents* web_contents = app_window->web_contents();
|
|
|
| + DCHECK_EQ(paths.size(), 1u);
|
| + std::vector<base::FilePath> check_paths;
|
| +#if defined(OS_CHROMEOS)
|
| + check_paths.push_back(
|
| + file_manager::util::IsUnderSpecialPath(GetProfile(), paths[0])
|
| + ? paths[0]
|
| + : base::MakeAbsoluteFilePath(paths[0]));
|
| +#else
|
| + check_paths.push_back(base::MakeAbsoluteFilePath(paths[0]));
|
| +#endif
|
| +
|
| content::BrowserThread::PostTask(
|
| content::BrowserThread::FILE,
|
| FROM_HERE,
|
| base::Bind(
|
| &FileSystemChooseEntryFunction::ConfirmDirectoryAccessOnFileThread,
|
| this,
|
| - paths,
|
| + check_paths,
|
| web_contents));
|
| return;
|
| }
|
| @@ -703,13 +714,8 @@ void FileSystemChooseEntryFunction::ConfirmDirectoryAccessOnFileThread(
|
| const std::vector<base::FilePath>& paths,
|
| content::WebContents* web_contents) {
|
| DCHECK_EQ(paths.size(), 1u);
|
| -#if defined(OS_CHROMEOS)
|
| - const base::FilePath path =
|
| - drive::util::IsUnderDriveMountPoint(paths[0]) ? paths[0] :
|
| - base::MakeAbsoluteFilePath(paths[0]);
|
| -#else
|
| - const base::FilePath path = base::MakeAbsoluteFilePath(paths[0]);
|
| -#endif
|
| + const base::FilePath& path = paths[0];
|
| +
|
| if (path.empty()) {
|
| content::BrowserThread::PostTask(
|
| content::BrowserThread::UI,
|
|
|