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

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: merge 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 6a3b2319871604828df9d4a027b7e1c6cd44a18d..d1d737308392473f890ce583d131b0b1309cb109 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -50,6 +50,7 @@ class ShareableFileReference;
}
namespace content {
+class ChildProcessSecurityPolicyImpl;
class ChromeBlobStorageContext;
// TODO(tyoshino): Factor out code except for IPC gluing from
@@ -125,7 +126,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);
@@ -210,10 +213,8 @@ 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);
+ // Sends a FileSystemMsg_DidFail and returns false if |url| is invalid.
+ bool ValidateFileSystemURL(int request_id, const fileapi::FileSystemURL& url);
// Retrieves the Stream object for |url| from |stream_context_|. Returns unset
// scoped_refptr when there's no Stream instance for the given |url|
@@ -227,6 +228,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)
« no previous file with comments | « content/browser/fileapi/browser_file_system_helper.cc ('k') | content/browser/fileapi/fileapi_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698