| Index: ppapi/cpp/file_ref.cc
|
| diff --git a/ppapi/cpp/file_ref.cc b/ppapi/cpp/file_ref.cc
|
| index 377fbbb04caeba6d52706acd681106a96771ee26..8f79baf9628b4f58af27abe868f054e57e7b486c 100644
|
| --- a/ppapi/cpp/file_ref.cc
|
| +++ b/ppapi/cpp/file_ref.cc
|
| @@ -32,19 +32,23 @@ FileRef::FileRef(PassRef, PP_Resource resource) : Resource(PASS_REF, resource) {
|
|
|
| FileRef::FileRef(const FileSystem& file_system,
|
| const char* path) {
|
| + CommonCreate(file_system.pp_resource(), path);
|
| +}
|
| +
|
| +FileRef::FileRef(const FileRef& other)
|
| + : Resource(other) {
|
| +}
|
| +
|
| +void FileRef::CommonCreate(PP_Resource file_system_resource, const char* path) {
|
| if (has_interface<PPB_FileRef_1_1>()) {
|
| PassRefFromConstructor(get_interface<PPB_FileRef_1_1>()->Create(
|
| - file_system.pp_resource(), path));
|
| + file_system_resource, path));
|
| } else if (has_interface<PPB_FileRef_1_0>()) {
|
| PassRefFromConstructor(get_interface<PPB_FileRef_1_0>()->Create(
|
| - file_system.pp_resource(), path));
|
| + file_system_resource, path));
|
| }
|
| }
|
|
|
| -FileRef::FileRef(const FileRef& other)
|
| - : Resource(other) {
|
| -}
|
| -
|
| PP_FileSystemType FileRef::GetFileSystemType() const {
|
| if (has_interface<PPB_FileRef_1_1>())
|
| return get_interface<PPB_FileRef_1_1>()->GetFileSystemType(pp_resource());
|
|
|