summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_file_io.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/pepper_file_io.cc')
-rw-r--r--webkit/glue/plugins/pepper_file_io.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/webkit/glue/plugins/pepper_file_io.cc b/webkit/glue/plugins/pepper_file_io.cc
index 926a6db..7100c1f 100644
--- a/webkit/glue/plugins/pepper_file_io.cc
+++ b/webkit/glue/plugins/pepper_file_io.cc
@@ -37,11 +37,11 @@ int32_t Open(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
scoped_refptr<FileRef> file_ref(Resource::GetAs<FileRef>(file_ref_id));
if (!file_ref.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Open(file_ref, open_flags, callback);
}
@@ -51,7 +51,7 @@ int32_t Query(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Query(info, callback);
}
@@ -62,7 +62,7 @@ int32_t Touch(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Touch(last_access_time, last_modified_time, callback);
}
@@ -74,7 +74,7 @@ int32_t Read(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Read(offset, buffer, bytes_to_read, callback);
}
@@ -86,7 +86,7 @@ int32_t Write(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Write(offset, buffer, bytes_to_write, callback);
}
@@ -96,7 +96,7 @@ int32_t SetLength(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->SetLength(length, callback);
}
@@ -105,7 +105,7 @@ int32_t Flush(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->Flush(callback);
}
@@ -134,7 +134,7 @@ const PPB_FileIO ppb_fileio = {
int32_t GetOSFileDescriptor(PP_Resource file_io_id) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->GetOSFileDescriptor();
}
@@ -145,7 +145,7 @@ int32_t WillWrite(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->WillWrite(offset, bytes_to_write, callback);
}
@@ -155,7 +155,7 @@ int32_t WillSetLength(PP_Resource file_io_id,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io.get())
- return PP_Error_BadResource;
+ return PP_ERROR_BADRESOURCE;
return file_io->WillSetLength(length, callback);
}
@@ -188,20 +188,20 @@ int32_t FileIO::Open(FileRef* file_ref,
int32_t open_flags,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::Query(PP_FileInfo* info,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::Touch(PP_Time last_access_time,
PP_Time last_modified_time,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::Read(int64_t offset,
@@ -209,7 +209,7 @@ int32_t FileIO::Read(int64_t offset,
int32_t bytes_to_read,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::Write(int64_t offset,
@@ -217,18 +217,18 @@ int32_t FileIO::Write(int64_t offset,
int32_t bytes_to_write,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::SetLength(int64_t length,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::Flush(PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
void FileIO::Close() {
@@ -237,20 +237,20 @@ void FileIO::Close() {
int32_t FileIO::GetOSFileDescriptor() {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::WillWrite(int64_t offset,
int32_t bytes_to_write,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
int32_t FileIO::WillSetLength(int64_t length,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
- return PP_Error_Failed;
+ return PP_ERROR_FAILED;
}
} // namespace pepper