OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
viettrungluu
2014/09/12 00:12:45
nit: Arguably, you should update this to 2014 (and
Hajime Morrita
2014/09/12 00:39:01
Aww. Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BASE_FILES_PLATFORM_FILE_H_ | |
6 #define BASE_FILES_PLATFORM_FILE_H_ | |
7 | |
8 #include "build/build_config.h" | |
9 #if defined(OS_WIN) | |
10 #include <windows.h> | |
11 #endif | |
12 | |
13 namespace base { | |
14 | |
15 #if defined(OS_WIN) | |
16 typedef HANDLE PlatformFile; | |
17 | |
18 inline PlatformFile InvalidPlatformFile() { | |
viettrungluu
2014/09/12 00:12:45
Why not just use a const?
Hajime Morrita
2014/09/12 00:39:01
Done.
| |
19 return INVALID_HANDLE_VALUE; | |
20 } | |
21 | |
22 #elif defined(OS_POSIX) | |
23 typedef int PlatformFile; | |
24 | |
25 inline PlatformFile InvalidPlatformFile() { | |
26 return -1; | |
27 } | |
28 | |
29 #endif // defined(OS_POSIX) | |
30 | |
31 } // namespace base | |
32 | |
33 #endif // BASE_FILES_PLATFORM_FILE_H_ | |
OLD | NEW |