Chromium Code Reviews| Index: chrome/browser/child_process_security_policy.h |
| =================================================================== |
| --- chrome/browser/child_process_security_policy.h (revision 60686) |
| +++ chrome/browser/child_process_security_policy.h (working copy) |
| @@ -69,8 +69,14 @@ |
| // Whenever the user picks a file from a <input type="file"> element, the |
| // browser should call this function to grant the renderer the capability to |
| // upload the file to the web. |
| - void GrantUploadFile(int renderer_id, const FilePath& file); |
| + void GrantReadFile(int renderer_id, const FilePath& file); |
| + // Grants certain permissions to a file. |permissions| must be a bit-set of |
| + // base::PlatformFileFlags. |
| + void GrantPermissionsForFile(int renderer_id, |
| + const FilePath& file, |
| + int permissions); |
| + |
| // Grants the renderer process the capability to access URLs of the provided |
| // scheme. |
| void GrantScheme(int renderer_id, const std::string& scheme); |
| @@ -100,8 +106,14 @@ |
| // Before servicing a renderer's request to upload a file to the web, the |
| // browser should call this method to determine whether the renderer has the |
| // capability to upload the requested file. |
| - bool CanUploadFile(int renderer_id, const FilePath& file); |
| + bool CanReadFile(int renderer_id, const FilePath& file); |
| + // Determins if certain permissions were granted for a file. |permissions| |
|
darin (slow to review)
2010/09/28 06:18:27
nit: Determins -> Determines
|
| + // must be a bit-set of base::PlatformFileFlags. |
| + bool HasPermissionsForFile(int renderer_id, |
| + const FilePath& file, |
| + int permissions); |
| + |
| // Returns true if the specified renderer_id has been granted DOMUIBindings. |
| // The browser should check this property before assuming the renderer is |
| // allowed to use DOMUIBindings. |