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

Unified Diff: chrome/browser/child_process_security_policy.h

Issue 3431032: Change ChildProcessSecurityPolicy to store a list of allowed flags for... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
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.
« no previous file with comments | « no previous file | chrome/browser/child_process_security_policy.cc » ('j') | chrome/browser/child_process_security_policy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698