| Index: content/browser/renderer_host/render_view_host.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/render_view_host.cc (revision 79702)
|
| +++ content/browser/renderer_host/render_view_host.cc (working copy)
|
| @@ -463,6 +463,10 @@
|
| policy->GrantRequestURL(process()->id(),
|
| net::FilePathToFileURL(path));
|
| policy->GrantReadFile(process()->id(), path);
|
| +
|
| + // Allow dragged directories to be enumerated by the child process.
|
| + // Note that we can't tell a file from a directory at this point.
|
| + policy->GrantReadDirectory(process()->id(), path);
|
| }
|
| Send(new DragMsg_TargetDragEnter(routing_id(), drop_data, client_pt,
|
| screen_pt, operations_allowed));
|
| @@ -685,6 +689,20 @@
|
| Send(new ViewMsg_RunFileChooserResponse(routing_id(), files));
|
| }
|
|
|
| +void RenderViewHost::DirectoryEnumerationFinished(
|
| + int request_id,
|
| + const std::vector<FilePath>& files) {
|
| + // Grant the security access requested to the given files.
|
| + for (std::vector<FilePath>::const_iterator file = files.begin();
|
| + file != files.end(); ++file) {
|
| + ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
|
| + process()->id(), *file);
|
| + }
|
| + Send(new ViewMsg_EnumerateDirectoryResponse(routing_id(),
|
| + request_id,
|
| + files));
|
| +}
|
| +
|
| void RenderViewHost::LoadStateChanged(const GURL& url,
|
| net::LoadState load_state,
|
| uint64 upload_position,
|
|
|