Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: base/files/file.h

Issue 2006703005: Define kInvalidPlatformFile in base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no ppapi Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/i18n/icu_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 11 matching lines...) Expand all
22 #include "base/win/scoped_handle.h" 22 #include "base/win/scoped_handle.h"
23 #endif 23 #endif
24 24
25 #if defined(OS_POSIX) 25 #if defined(OS_POSIX)
26 #include <sys/stat.h> 26 #include <sys/stat.h>
27 #endif 27 #endif
28 28
29 namespace base { 29 namespace base {
30 30
31 #if defined(OS_WIN) 31 #if defined(OS_WIN)
32 typedef HANDLE PlatformFile; 32 using PlatformFile = HANDLE;
33
34 const PlatformFile kInvalidPlatformFile = INVALID_HANDLE_VALUE;
33 #elif defined(OS_POSIX) 35 #elif defined(OS_POSIX)
34 typedef int PlatformFile; 36 using PlatformFile = int;
35 37
38 const PlatformFile kInvalidPlatformFile = -1;
36 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL) 39 #if defined(OS_BSD) || defined(OS_MACOSX) || defined(OS_NACL)
37 typedef struct stat stat_wrapper_t; 40 typedef struct stat stat_wrapper_t;
38 #else 41 #else
39 typedef struct stat64 stat_wrapper_t; 42 typedef struct stat64 stat_wrapper_t;
40 #endif 43 #endif
41 #endif // defined(OS_POSIX) 44 #endif // defined(OS_POSIX)
42 45
43 // Thin wrapper around an OS-level file. 46 // Thin wrapper around an OS-level file.
44 // Note that this class does not provide any support for asynchronous IO, other 47 // Note that this class does not provide any support for asynchronous IO, other
45 // than the ability to create asynchronous handles on Windows. 48 // than the ability to create asynchronous handles on Windows.
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 333
331 Error error_details_; 334 Error error_details_;
332 bool created_; 335 bool created_;
333 bool async_; 336 bool async_;
334 }; 337 };
335 338
336 } // namespace base 339 } // namespace base
337 340
338 #endif // BASE_FILES_FILE_H_ 341 #endif // BASE_FILES_FILE_H_
339 342
OLDNEW
« no previous file with comments | « no previous file | base/i18n/icu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698