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 6807690cacf0d0ca34bd2ae6ca442fc1fb791f95..6c7e2e36cb851530d074d91e4a84792e5c1c1fa2 100644 |
--- a/content/public/browser/child_process_security_policy.h |
+++ b/content/public/browser/child_process_security_policy.h |
@@ -10,6 +10,10 @@ |
#include "base/basictypes.h" |
#include "content/common/content_export.h" |
+#if defined(OS_ANDROID) |
+#include "url/gurl.h" |
+#endif |
+ |
namespace base { |
class FilePath; |
} |
@@ -132,6 +136,22 @@ class ChildProcessSecurityPolicy { |
// Returns true if delete-from access has been granted to |filesystem_id|. |
virtual bool CanDeleteFromFileSystem(int child_id, |
const std::string& filesystem_id) = 0; |
+ |
+#if defined(OS_ANDROID) |
+ // This permission grants only read access to a content url. |
+ // Whenever the user picks a content url 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. |
+ virtual void GrantReadContentUrl(int child_id, |
+ const GURL& content_url) = 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 CanReadContentUrl(int child_id, |
+ const GURL& content_url) = 0; |
+#endif |
}; |
}; // namespace content |