| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ppapi/cpp/dev/file_ref_dev.h" | 5 #include "ppapi/cpp/dev/file_ref_dev.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.h" |
| 9 #include "ppapi/cpp/dev/file_system_dev.h" | 9 #include "ppapi/cpp/dev/file_system_dev.h" |
| 10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 FileRef_Dev FileRef_Dev::GetParent() const { | 66 FileRef_Dev FileRef_Dev::GetParent() const { |
| 67 if (!file_ref_f) | 67 if (!file_ref_f) |
| 68 return FileRef_Dev(); | 68 return FileRef_Dev(); |
| 69 return FileRef_Dev(PassRef(), file_ref_f->GetParent(pp_resource())); | 69 return FileRef_Dev(PassRef(), file_ref_f->GetParent(pp_resource())); |
| 70 } | 70 } |
| 71 | 71 |
| 72 int32_t FileRef_Dev::MakeDirectory(const CompletionCallback& cc) { | 72 int32_t FileRef_Dev::MakeDirectory(const CompletionCallback& cc) { |
| 73 if (!file_ref_f) | 73 if (!file_ref_f) |
| 74 return PP_ERROR_NOINTERFACE; | 74 return PP_ERROR_NOINTERFACE; |
| 75 return file_ref_f->MakeDirectory(pp_resource(), | 75 return file_ref_f->MakeDirectory(pp_resource(), |
| 76 false, // make_ancestors | 76 PP_FALSE, // make_ancestors |
| 77 cc.pp_completion_callback()); | 77 cc.pp_completion_callback()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 int32_t FileRef_Dev::MakeDirectoryIncludingAncestors( | 80 int32_t FileRef_Dev::MakeDirectoryIncludingAncestors( |
| 81 const CompletionCallback& cc) { | 81 const CompletionCallback& cc) { |
| 82 if (!file_ref_f) | 82 if (!file_ref_f) |
| 83 return PP_ERROR_NOINTERFACE; | 83 return PP_ERROR_NOINTERFACE; |
| 84 return file_ref_f->MakeDirectory(pp_resource(), | 84 return file_ref_f->MakeDirectory(pp_resource(), |
| 85 true, // make_ancestors | 85 PP_TRUE, // make_ancestors |
| 86 cc.pp_completion_callback()); | 86 cc.pp_completion_callback()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 int32_t FileRef_Dev::Query(PP_FileInfo_Dev* result_buf, | 89 int32_t FileRef_Dev::Query(PP_FileInfo_Dev* result_buf, |
| 90 const CompletionCallback& cc) { | 90 const CompletionCallback& cc) { |
| 91 if (!file_ref_f) | 91 if (!file_ref_f) |
| 92 return PP_ERROR_NOINTERFACE; | 92 return PP_ERROR_NOINTERFACE; |
| 93 return file_ref_f->Query(pp_resource(), | 93 return file_ref_f->Query(pp_resource(), |
| 94 result_buf, | 94 result_buf, |
| 95 cc.pp_completion_callback()); | 95 cc.pp_completion_callback()); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 115 int32_t FileRef_Dev::Rename(const FileRef_Dev& new_file_ref, | 115 int32_t FileRef_Dev::Rename(const FileRef_Dev& new_file_ref, |
| 116 const CompletionCallback& cc) { | 116 const CompletionCallback& cc) { |
| 117 if (!file_ref_f) | 117 if (!file_ref_f) |
| 118 return PP_ERROR_NOINTERFACE; | 118 return PP_ERROR_NOINTERFACE; |
| 119 return file_ref_f->Rename(pp_resource(), | 119 return file_ref_f->Rename(pp_resource(), |
| 120 new_file_ref.pp_resource(), | 120 new_file_ref.pp_resource(), |
| 121 cc.pp_completion_callback()); | 121 cc.pp_completion_callback()); |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace pp | 124 } // namespace pp |
| OLD | NEW |