Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1303)

Unified Diff: content/browser/child_process_security_policy.h

Issue 6623015: Add a path for a web page to request the enumeration of a directory. This, t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | content/browser/child_process_security_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_security_policy.h
===================================================================
--- content/browser/child_process_security_policy.h (revision 79702)
+++ content/browser/child_process_security_policy.h (working copy)
@@ -71,6 +71,10 @@
// to upload the file to the web.
void GrantReadFile(int child_id, const FilePath& file);
+ // Grants the child process permission to enumerate all the files in
+ // this directory and read those files.
+ void GrantReadDirectory(int child_id, const FilePath& directory);
+
// Grants certain permissions to a file. |permissions| must be a bit-set of
// base::PlatformFileFlags.
void GrantPermissionsForFile(int child_id,
@@ -106,6 +110,10 @@
// capability to upload the requested file.
bool CanReadFile(int child_id, const FilePath& file);
+ // Before servicing a child process's request to enumerate a directory
+ // the browser should call this method to check for the capability.
+ bool CanReadDirectory(int child_id, const FilePath& directory);
+
// Determines if certain permissions were granted for a file. |permissions|
// must be a bit-set of base::PlatformFileFlags.
bool HasPermissionsForFile(int child_id,
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | content/browser/child_process_security_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698