PepperExternalFileRefBackend::PepperExternalFileRefBackend(
ppapi::host::PpapiHost* host,
int render_process_id,
- const base::FilePath& path) : host_(host),
- path_(path),
- render_process_id_(render_process_id),
- weak_factory_(this) {
+ const base::FilePath& path)
+ : host_(host),
+ path_(path),
+ render_process_id_(render_process_id),
+ weak_factory_(this) {
task_runner_ =
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE);
}
-PepperExternalFileRefBackend::~PepperExternalFileRefBackend() {
-}
+PepperExternalFileRefBackend::~PepperExternalFileRefBackend() {}
int32_t PepperExternalFileRefBackend::MakeDirectory(
ppapi::host::ReplyMessageContext reply_context,
int32_t PepperExternalFileRefBackend::GetAbsolutePath(
ppapi::host::ReplyMessageContext reply_context) {
- host_->SendReply(reply_context,
+ host_->SendReply(
+ reply_context,
PpapiPluginMsg_FileRef_GetAbsolutePathReply(path_.AsUTF8Unsafe()));
// Use PP_OK_COMPLETIONPENDING instead of PP_OK since we've already sent our
}
int32_t PepperExternalFileRefBackend::CanRead() const {
- if (!ChildProcessSecurityPolicyImpl::GetInstance()->
- CanReadFile(render_process_id_, path_)) {
+ if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
+ render_process_id_, path_)) {
return PP_ERROR_NOACCESS;
}
return PP_OK;
}
int32_t PepperExternalFileRefBackend::CanReadWrite() const {
- if (!ChildProcessSecurityPolicyImpl::GetInstance()->
- CanCreateReadWriteFile(render_process_id_, path_)) {
+ if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanCreateReadWriteFile(
+ render_process_id_, path_)) {
return PP_ERROR_NOACCESS;
}
return PP_OK;
PP_FileInfo pp_file_info;
if (error == base::File::FILE_OK) {
- ppapi::FileInfoToPepperFileInfo(file_info, PP_FILESYSTEMTYPE_EXTERNAL,
- &pp_file_info);
+ ppapi::FileInfoToPepperFileInfo(
+ file_info, PP_FILESYSTEMTYPE_EXTERNAL, &pp_file_info);
} else {
memset(&pp_file_info, 0, sizeof(pp_file_info));
}