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

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: 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/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 aedf882b4b7632f7503a2701e4817d5a09b8185f..d6cd8fa4137874a947456ea673c4b42aa543fa78 100644
--- a/content/renderer/pepper/pepper_file_io_host.cc
+++ b/content/renderer/pepper/pepper_file_io_host.cc
@@ -222,14 +222,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;
- }
ppapi::host::ResourceHost* resource_host =
renderer_ppapi_host_->GetPpapiHost()->GetResourceHost(file_ref_resource);
@@ -248,8 +243,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