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

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: 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/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 6b9cfc54d947ecd04aa5df2e74b820a361b332d0..1883c3eb843f367d85f7eb1378a44788a8c60fd1 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))
Tom Sepez 2013/09/04 22:22:45 Is this called in other places? Can it be replaced
tommycli 2013/09/04 23:21:27 Yes, called in FileAPIMessageFilter.
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 {

Powered by Google App Engine
This is Rietveld 408576698