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 9295c345636d1983eccf18414392468016310eb9..8236aeb93a7ebe57bf53c53cc9e8e17e8360c980 100644 |
--- a/content/public/browser/child_process_security_policy.h |
+++ b/content/public/browser/child_process_security_policy.h |
@@ -40,15 +40,18 @@ 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. |
+ // These methods verify whether or not the child process has been granted |
+ // permissions perform these functions on |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 CanCreateReadWriteFile(int child_id, |
+ const base::FilePath& file) = 0; |
- // 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. |
+ // These methods grant the child process permissions on |file|. |
virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0; |
+ virtual void GrantWriteFile(int child_id, const base::FilePath& file) = 0; |
+ virtual void GrantCreateFile(int child_id, const base::FilePath& file) = 0; |
// This permission grants creation, read, and full write access to a file, |
// including attributes. |