Enable |ValidateAndConvertPepperFilePath()| for domain-absolute paths without ENABLE_FLAPPER_HACKS.

TBR=darin@chromium.org

Review URL: http://codereview.chromium.org/8566047

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110773 0039d316-1c4b-4281-b951-d872f2087c98
parent 15877cac
...@@ -222,16 +222,10 @@ FilePath PepperFileMessageFilter::ValidateAndConvertPepperFilePath( ...@@ -222,16 +222,10 @@ FilePath PepperFileMessageFilter::ValidateAndConvertPepperFilePath(
FilePath file_path; // Empty path returned on error. FilePath file_path; // Empty path returned on error.
switch(pepper_path.domain()) { switch(pepper_path.domain()) {
case webkit::ppapi::PepperFilePath::DOMAIN_ABSOLUTE: case webkit::ppapi::PepperFilePath::DOMAIN_ABSOLUTE:
// TODO(viettrungluu): This could be dangerous if not 100% right, so let's be
// conservative and only enable it when requested.
#if defined(ENABLE_FLAPPER_HACKS)
if (pepper_path.path().IsAbsolute() && if (pepper_path.path().IsAbsolute() &&
ChildProcessSecurityPolicy::GetInstance()->HasPermissionsForFile( ChildProcessSecurityPolicy::GetInstance()->HasPermissionsForFile(
child_id(), pepper_path.path(), flags)) child_id(), pepper_path.path(), flags))
file_path = pepper_path.path(); file_path = pepper_path.path();
#else
NOTIMPLEMENTED();
#endif // ENABLE_FLAPPER_HACKS
break; break;
case webkit::ppapi::PepperFilePath::DOMAIN_MODULE_LOCAL: case webkit::ppapi::PepperFilePath::DOMAIN_MODULE_LOCAL:
if (!pepper_path.path().IsAbsolute() && if (!pepper_path.path().IsAbsolute() &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment