diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-30 19:23:03 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-30 19:23:03 +0000 |
commit | e68a890ec9009ec615cba6de4ac7227f2b83115e (patch) | |
tree | 63665fe7c9fdca5ba96c9eb7096b2e08b394f587 | |
parent | a8041ecf5a90c7adf8a5b9e32499f9b268f85ab9 (diff) | |
download | chromium_src-e68a890ec9009ec615cba6de4ac7227f2b83115e.zip chromium_src-e68a890ec9009ec615cba6de4ac7227f2b83115e.tar.gz chromium_src-e68a890ec9009ec615cba6de4ac7227f2b83115e.tar.bz2 |
Pepper: Allow RequestOSFileDescriptor for PRIVATE.
The FileIO_Private API contains the RequestOSFileDescriptor call. However, the
host currently only allows it to be used by whitelisted extensions or if a flag
is passed.
This change also permits the call for plugins with PERMISSION_PRIVATE. This
allows this interface to be used by the NaCl "trusted plugin".
BUG=246396
R=bbudge@chromium.org
Review URL: https://codereview.chromium.org/25049005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226024 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/renderer/pepper/pepper_file_io_host.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/renderer/pepper/pepper_file_io_host.cc b/content/renderer/pepper/pepper_file_io_host.cc index f5bfeac..8f399c0 100644 --- a/content/renderer/pepper/pepper_file_io_host.cc +++ b/content/renderer/pepper/pepper_file_io_host.cc @@ -398,7 +398,8 @@ int32_t PepperFileIOHost::OnHostMsgRequestOSFileHandle( return PP_ERROR_FAILED; // Whitelist to make it privately accessible. - if (!GetContentClient()->renderer()->IsPluginAllowedToCallRequestOSFileHandle( + if (!host()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE) && + !GetContentClient()->renderer()->IsPluginAllowedToCallRequestOSFileHandle( renderer_ppapi_host_->GetContainerForInstance(pp_instance()))) return PP_ERROR_NOACCESS; |