diff options
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.h | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 5298315..81709ef 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -556,12 +556,13 @@ void RenderViewHost::SetInitialFocus(bool reverse) { } void RenderViewHost::FilesSelectedInChooser( - const std::vector<FilePath>& files) { + const std::vector<FilePath>& files, + int permissions) { // 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); + ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( + process()->id(), *file, permissions); } Send(new ViewMsg_RunFileChooserResponse(routing_id(), files)); } diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h index d29b8e4..fb55ee06 100644 --- a/content/browser/renderer_host/render_view_host.h +++ b/content/browser/renderer_host/render_view_host.h @@ -307,8 +307,11 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost { const FilePath& local_directory_name); // Notifies the Listener that one or more files have been chosen by the user - // from an Open File dialog for the form. - void FilesSelectedInChooser(const std::vector<FilePath>& files); + // from a file chooser dialog for the form. |permissions| are flags from the + // base::PlatformFileFlags enum which specify which file permissions should + // be granted to the renderer. + void FilesSelectedInChooser(const std::vector<FilePath>& files, + int permissions); // Notifies the listener that a directory enumeration is complete. void DirectoryEnumerationFinished(int request_id, |