| Index: chrome/browser/devtools/devtools_file_helper.cc
|
| diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
|
| index c1541c4a2dcfcddade558e6ac839f70b4a4e578f..0525e9c62efbd76653a2cf899bb15a6e1d01c7c8 100644
|
| --- a/chrome/browser/devtools/devtools_file_helper.cc
|
| +++ b/chrome/browser/devtools/devtools_file_helper.cc
|
| @@ -35,6 +35,7 @@
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/shell_dialogs/select_file_dialog.h"
|
| +#include "webkit/browser/fileapi/file_system_url.h"
|
| #include "webkit/browser/fileapi/isolated_context.h"
|
| #include "webkit/common/fileapi/file_system_util.h"
|
|
|
| @@ -309,6 +310,27 @@ void DevToolsFileHelper::AddFileSystem(
|
| base::FilePath());
|
| }
|
|
|
| +void DevToolsFileHelper::UpgradeDraggedFileSystemPermissions(
|
| + const std::string& file_system_url,
|
| + const AddFileSystemCallback& callback,
|
| + const ShowInfoBarCallback& show_info_bar_callback) {
|
| + fileapi::FileSystemURL root_url =
|
| + isolated_context()->CrackURL(GURL(file_system_url));
|
| + if (!root_url.is_valid() || !root_url.path().empty()) {
|
| + callback.Run(FileSystem());
|
| + return;
|
| + }
|
| +
|
| + std::vector<fileapi::MountPoints::MountPointInfo> mount_points;
|
| + isolated_context()->GetDraggedFileInfo(root_url.filesystem_id(),
|
| + &mount_points);
|
| +
|
| + std::vector<fileapi::MountPoints::MountPointInfo>::const_iterator it =
|
| + mount_points.begin();
|
| + for (; it != mount_points.end(); ++it)
|
| + InnerAddFileSystem(callback, show_info_bar_callback, it->path);
|
| +}
|
| +
|
| void DevToolsFileHelper::InnerAddFileSystem(
|
| const AddFileSystemCallback& callback,
|
| const ShowInfoBarCallback& show_info_bar_callback,
|
|
|