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

Unified Diff: ppapi/shared_impl/file_type_conversion.cc

Issue 19723010: Pepper Message Filters: Port to use explicit permission grants in ChildProcessSecurityPolicy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0044-write-support-remove-child-process-security-policy-bitmask-usage
Patch Set: Created 7 years, 5 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 | « ppapi/proxy/ppapi_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/file_type_conversion.cc
diff --git a/ppapi/shared_impl/file_type_conversion.cc b/ppapi/shared_impl/file_type_conversion.cc
index f9d65704ab9265056792fdc7c2632d0c8621130a..917d1968ea507cbb2805de854ee56bab9d85db42 100644
--- a/ppapi/shared_impl/file_type_conversion.cc
+++ b/ppapi/shared_impl/file_type_conversion.cc
@@ -37,9 +37,6 @@ int PlatformFileErrorToPepperError(base::PlatformFileError error_code) {
bool PepperFileOpenFlagsToPlatformFileFlags(int32_t pp_open_flags,
int* flags_out) {
- if (!flags_out)
- return false;
-
bool pp_read = !!(pp_open_flags & PP_FILEOPENFLAG_READ);
bool pp_write = !!(pp_open_flags & PP_FILEOPENFLAG_WRITE);
bool pp_create = !!(pp_open_flags & PP_FILEOPENFLAG_CREATE);
@@ -77,7 +74,8 @@ bool PepperFileOpenFlagsToPlatformFileFlags(int32_t pp_open_flags,
flags |= base::PLATFORM_FILE_OPEN;
}
- *flags_out = flags;
+ if (flags_out)
+ *flags_out = flags;
return true;
}
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698