Index: content/browser/renderer_host/render_view_host_impl.cc |
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
index e09a455166424c011bcc28c2537ad29e99240367..e8ad3e0c52c104121a597eb57a61f01b87f24031 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -734,6 +734,10 @@ void RenderViewHostImpl::SetInitialFocus(bool reverse) { |
void RenderViewHostImpl::FilesSelectedInChooser( |
const std::vector<content::FileChooserFileInfo>& files, |
FileChooserParams::Mode permissions) { |
+ storage::FileSystemContext* const file_system_context = |
+ BrowserContext::GetStoragePartition(GetProcess()->GetBrowserContext(), |
+ GetSiteInstance()) |
+ ->GetFileSystemContext(); |
// Grant the security access requested to the given files. |
for (size_t i = 0; i < files.size(); ++i) { |
const content::FileChooserFileInfo& file = files[i]; |
@@ -744,6 +748,12 @@ void RenderViewHostImpl::FilesSelectedInChooser( |
ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( |
GetProcess()->GetID(), file.file_path); |
} |
+ if (file.file_system_url.is_valid()) { |
+ ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFileSystem( |
+ GetProcess()->GetID(), |
+ file_system_context->CrackURL(file.file_system_url) |
+ .mount_filesystem_id()); |
+ } |
} |
Send(new ViewMsg_RunFileChooserResponse(GetRoutingID(), files)); |
} |