| 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 BASE_PLATFORM_FILE_H_ | 5 #ifndef BASE_PLATFORM_FILE_H_ |
| 6 #define BASE_PLATFORM_FILE_H_ | 6 #define BASE_PLATFORM_FILE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 PLATFORM_FILE_WRITE = 64, | 43 PLATFORM_FILE_WRITE = 64, |
| 44 PLATFORM_FILE_EXCLUSIVE_READ = 128, // EXCLUSIVE is opposite of Windows SHARE | 44 PLATFORM_FILE_EXCLUSIVE_READ = 128, // EXCLUSIVE is opposite of Windows SHARE |
| 45 PLATFORM_FILE_EXCLUSIVE_WRITE = 256, | 45 PLATFORM_FILE_EXCLUSIVE_WRITE = 256, |
| 46 PLATFORM_FILE_ASYNC = 512, | 46 PLATFORM_FILE_ASYNC = 512, |
| 47 PLATFORM_FILE_TEMPORARY = 1024, // Used on Windows only | 47 PLATFORM_FILE_TEMPORARY = 1024, // Used on Windows only |
| 48 PLATFORM_FILE_HIDDEN = 2048, // Used on Windows only | 48 PLATFORM_FILE_HIDDEN = 2048, // Used on Windows only |
| 49 PLATFORM_FILE_DELETE_ON_CLOSE = 4096, | 49 PLATFORM_FILE_DELETE_ON_CLOSE = 4096, |
| 50 | 50 |
| 51 PLATFORM_FILE_WRITE_ATTRIBUTES = 8192, // Used on Windows only | 51 PLATFORM_FILE_WRITE_ATTRIBUTES = 8192, // Used on Windows only |
| 52 PLATFORM_FILE_ENUMERATE = 16384, // May enumerate directory | 52 PLATFORM_FILE_ENUMERATE = 16384, // May enumerate directory |
| 53 |
| 54 PLATFORM_FILE_SHARE_DELETE = 32768, // Used on Windows only |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of | 57 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of |
| 56 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a | 58 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a |
| 57 // browser policy doesn't allow the operation to be executed. | 59 // browser policy doesn't allow the operation to be executed. |
| 58 enum PlatformFileError { | 60 enum PlatformFileError { |
| 59 PLATFORM_FILE_OK = 0, | 61 PLATFORM_FILE_OK = 0, |
| 60 PLATFORM_FILE_ERROR_FAILED = -1, | 62 PLATFORM_FILE_ERROR_FAILED = -1, |
| 61 PLATFORM_FILE_ERROR_IN_USE = -2, | 63 PLATFORM_FILE_ERROR_IN_USE = -2, |
| 62 PLATFORM_FILE_ERROR_EXISTS = -3, | 64 PLATFORM_FILE_ERROR_EXISTS = -3, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 return temp; | 176 return temp; |
| 175 } | 177 } |
| 176 | 178 |
| 177 private: | 179 private: |
| 178 PlatformFile* value_; | 180 PlatformFile* value_; |
| 179 }; | 181 }; |
| 180 | 182 |
| 181 } // namespace base | 183 } // namespace base |
| 182 | 184 |
| 183 #endif // BASE_PLATFORM_FILE_H_ | 185 #endif // BASE_PLATFORM_FILE_H_ |
| OLD | NEW |