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

Unified Diff: content/renderer/pepper/pepper_file_io_host.cc

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
« no previous file with comments | « content/common/fileapi/file_system_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_file_io_host.cc
diff --git a/content/renderer/pepper/pepper_file_io_host.cc b/content/renderer/pepper/pepper_file_io_host.cc
index d472da2196d3bba286dec95fe17e8bd02ce6a973..1690e2e3d0de4a8b2030214989e89ead61c31ed9 100644
--- a/content/renderer/pepper/pepper_file_io_host.cc
+++ b/content/renderer/pepper/pepper_file_io_host.cc
@@ -220,14 +220,9 @@ int32_t PepperFileIOHost::OnHostMsgOpen(
if (rv != PP_OK)
return rv;
- // TODO(tommycli): Eventually just pass the Pepper flags straight to the
- // FileSystemDispatcher so it can handle doing the security check.
- int platform_file_flags = 0;
open_flags_ = open_flags;
- if (!ppapi::PepperFileOpenFlagsToPlatformFileFlags(open_flags,
- &platform_file_flags)) {
+ if (!ppapi::PepperFileOpenFlagsToPlatformFileFlags(open_flags, NULL))
return PP_ERROR_BADARGUMENT;
- }
EnterResourceNoLock<PPB_FileRef_API> enter(file_ref_resource, true);
if (enter.failed())
@@ -252,8 +247,8 @@ int32_t PepperFileIOHost::OnHostMsgOpen(
&PepperFileIOHost::ExecutePlatformOpenFileSystemURLCallback,
weak_factory_.GetWeakPtr(),
context->MakeReplyMessageContext());
- file_system_dispatcher->OpenFile(
- file_system_url_, platform_file_flags,
+ file_system_dispatcher->OpenPepperFile(
+ file_system_url_, open_flags,
base::Bind(&DidOpenFileSystemURL, callback),
base::Bind(&DidFailOpenFileSystemURL, callback));
} else {
« no previous file with comments | « content/common/fileapi/file_system_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698