OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FILES_FILE_H_ | 5 #ifndef BASE_FILES_FILE_H_ |
6 #define BASE_FILES_FILE_H_ | 6 #define BASE_FILES_FILE_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 File(); | 143 File(); |
144 | 144 |
145 // Creates or opens the given file. This will fail with 'access denied' if the | 145 // Creates or opens the given file. This will fail with 'access denied' if the |
146 // |name| contains path traversal ('..') components. | 146 // |name| contains path traversal ('..') components. |
147 File(const FilePath& name, uint32 flags); | 147 File(const FilePath& name, uint32 flags); |
148 | 148 |
149 // Takes ownership of |platform_file|. | 149 // Takes ownership of |platform_file|. |
150 explicit File(PlatformFile platform_file); | 150 explicit File(PlatformFile platform_file); |
151 | 151 |
| 152 // Creates an object with a specific error_details code. |
| 153 explicit File(Error error_details); |
| 154 |
152 // Move constructor for C++03 move emulation of this type. | 155 // Move constructor for C++03 move emulation of this type. |
153 File(RValue other); | 156 File(RValue other); |
154 | 157 |
155 ~File(); | 158 ~File(); |
156 | 159 |
157 // Move operator= for C++03 move emulation of this type. | 160 // Move operator= for C++03 move emulation of this type. |
158 File& operator=(RValue other); | 161 File& operator=(RValue other); |
159 | 162 |
160 // Creates or opens the given file. | 163 // Creates or opens the given file. |
161 void Initialize(const FilePath& name, uint32 flags); | 164 void Initialize(const FilePath& name, uint32 flags); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 #endif | 284 #endif |
282 | 285 |
283 Error error_details_; | 286 Error error_details_; |
284 bool created_; | 287 bool created_; |
285 bool async_; | 288 bool async_; |
286 }; | 289 }; |
287 | 290 |
288 } // namespace base | 291 } // namespace base |
289 | 292 |
290 #endif // BASE_FILES_FILE_H_ | 293 #endif // BASE_FILES_FILE_H_ |
OLD | NEW |