| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ | 5 #ifndef PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ |
| 6 #define PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ | 6 #define PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ |
| 7 | 7 |
| 8 #include "base/platform_file.h" | 8 #include "base/files/file.h" |
| 9 #include "ppapi/c/pp_file_info.h" | 9 #include "ppapi/c/pp_file_info.h" |
| 10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
| 11 #include "ppapi/c/ppb_file_system.h" | 11 #include "ppapi/c/ppb_file_system.h" |
| 12 #include "ppapi/shared_impl/ppapi_shared_export.h" | 12 #include "ppapi/shared_impl/ppapi_shared_export.h" |
| 13 | 13 |
| 14 namespace ppapi { | 14 namespace ppapi { |
| 15 | 15 |
| 16 PPAPI_SHARED_EXPORT int PlatformFileErrorToPepperError( | 16 PPAPI_SHARED_EXPORT int FileErrorToPepperError(base::File::Error error_code); |
| 17 base::PlatformFileError error_code); | |
| 18 | 17 |
| 19 // Converts a PP_FileOpenFlags_Dev flag combination into a corresponding | 18 // Converts a PP_FileOpenFlags_Dev flag combination into a corresponding |
| 20 // PlatformFileFlags flag combination. | 19 // PlatformFileFlags flag combination. |
| 21 // Returns |true| if okay. | 20 // Returns |true| if okay. |
| 22 PPAPI_SHARED_EXPORT bool PepperFileOpenFlagsToPlatformFileFlags( | 21 PPAPI_SHARED_EXPORT bool PepperFileOpenFlagsToPlatformFileFlags( |
| 23 int32_t pp_open_flags, | 22 int32_t pp_open_flags, |
| 24 int* flags_out); | 23 int* flags_out); |
| 25 | 24 |
| 26 PPAPI_SHARED_EXPORT void PlatformFileInfoToPepperFileInfo( | 25 PPAPI_SHARED_EXPORT void FileInfoToPepperFileInfo( |
| 27 const base::PlatformFileInfo& info, | 26 const base::File::Info& info, |
| 28 PP_FileSystemType fs_type, | 27 PP_FileSystemType fs_type, |
| 29 PP_FileInfo* info_out); | 28 PP_FileInfo* info_out); |
| 30 | 29 |
| 31 } // namespace ppapi | 30 } // namespace ppapi |
| 32 | 31 |
| 33 #endif // PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ | 32 #endif // PPAPI_SHARED_IMPL_FILE_TYPE_CONVERSION_H_ |
| OLD | NEW |