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

Unified Diff: content/browser/fileapi/fileapi_message_filter.h

Issue 23760004: ChildProcessSecurityPolicy: Port FileAPIMessageFilter to use new checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply kinuko suggestions on reducing sloc bloat Created 7 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: content/browser/fileapi/fileapi_message_filter.h
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index 873d01063fc23fe44c754c85e5dd1cf19a98515a..2c9a680e8d37de00501b65e0af3181273cda648b 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -49,6 +49,7 @@ class ShareableFileReference;
}
namespace content {
+class ChildProcessSecurityPolicyImpl;
class ChromeBlobStorageContext;
// TODO(tyoshino): Factor out code except for IPC gluing from
@@ -119,7 +120,9 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
const base::Time& last_access_time,
const base::Time& last_modified_time);
void OnCancel(int request_id, int request_to_cancel);
- void OnOpenFile(int request_id, const GURL& path, int file_flags);
+#if defined(ENABLE_PLUGINS)
+ void OnOpenPepperFile(int request_id, const GURL& path, int pp_open_flags);
+#endif // defined(ENABLE_PLUGINS)
void OnNotifyCloseFile(int file_open_id);
void OnWillUpdate(const GURL& path);
void OnDidUpdate(const GURL& path, int64 delta);
@@ -192,10 +195,7 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
- // Checks renderer's access permissions for single file.
- bool HasPermissionsForFile(const fileapi::FileSystemURL& url,
- int permissions,
- base::PlatformFileError* error);
+ bool ValidateFileSystemURL(int request_id, const fileapi::FileSystemURL& url);
kinuko 2013/09/06 02:28:55 Can you add a method comment saying this sends Did
tommycli 2013/09/07 00:28:22 Done.
// Retrieves the Stream object for |url| from |stream_context_|. Returns unset
// scoped_refptr when there's no Stream instance for the given |url|
@@ -209,6 +209,7 @@ class CONTENT_EXPORT FileAPIMessageFilter : public BrowserMessageFilter {
int process_id_;
fileapi::FileSystemContext* context_;
+ ChildProcessSecurityPolicyImpl* security_policy_;
// Keeps map from request_id to OperationID for ongoing operations.
// (Primarily for Cancel operation)

Powered by Google App Engine
This is Rietveld 408576698