Index: content/public/browser/child_process_security_policy.h |
diff --git a/content/public/browser/child_process_security_policy.h b/content/public/browser/child_process_security_policy.h |
index 6439e727fbb5454de3c9d6297837ba195384f249..2ab2d1add2bb5f4bcf521d8b7d5e778a8b2b6694 100644 |
--- a/content/public/browser/child_process_security_policy.h |
+++ b/content/public/browser/child_process_security_policy.h |
@@ -40,11 +40,7 @@ class ChildProcessSecurityPolicy { |
// Returns true iff |scheme| has been registered as a web-safe scheme. |
virtual bool IsWebSafeScheme(const std::string& scheme) = 0; |
- // Before servicing a child process's request to upload a file to the web, the |
- // browser should call this method to determine whether the process has the |
- // capability to upload the requested file. |
- virtual bool CanReadFile(int child_id, const base::FilePath& file) = 0; |
- |
+ // This permission grants only read access to a file. |
// Whenever the user picks a file from a <input type="file"> element, the |
// browser should call this function to grant the child process the capability |
// to upload the file to the web. Grants FILE_PERMISSION_READ_ONLY. |
@@ -59,6 +55,17 @@ class ChildProcessSecurityPolicy { |
virtual void GrantCreateWriteFile(int child_id, |
const base::FilePath& file) = 0; |
+ // These methods verify whether or not the child process has been granted |
+ // permissions perform these functions on |file|. |
+ |
+ // Before servicing a child process's request to upload a file to the web, the |
+ // browser should call this method to determine whether the process has the |
+ // capability to upload the requested file. |
+ virtual bool CanReadFile(int child_id, const base::FilePath& file) = 0; |
+ virtual bool CanWriteFile(int child_id, const base::FilePath& file) = 0; |
+ virtual bool CanCreateFile(int child_id, const base::FilePath& file) = 0; |
+ virtual bool CanCreateWriteFile(int child_id, const base::FilePath& file) = 0; |
+ |
// Grants read access permission to the given isolated file system |
// identified by |filesystem_id|. An isolated file system can be |
// created for a set of native files/directories (like dropped files) |