OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 NET_BASE_WININET_UTIL_H__ | 5 #ifndef NET_BASE_WININET_UTIL_H__ |
6 #define NET_BASE_WININET_UTIL_H__ | 6 #define NET_BASE_WININET_UTIL_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <wininet.h> | 9 #include <wininet.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Global functions and variables for using WinInet. | 15 // Global functions and variables for using WinInet. |
16 class WinInetUtil { | 16 class WinInetUtil { |
17 public: | 17 public: |
18 // Maps Windows error codes (returned by GetLastError()) to net::ERR_xxx | 18 // Maps Windows error codes (returned by GetLastError()) to net::ERR_xxx |
19 // error codes. | 19 // error codes. |
20 static int OSErrorToNetError(DWORD os_error); | 20 static int OSErrorToNetError(DWORD os_error); |
21 }; | 21 }; |
22 | 22 |
23 } // namespace net | 23 } // namespace net |
24 | 24 |
25 #endif // NET_BASE_WININET_UTIL_H__ | 25 #endif // NET_BASE_WININET_UTIL_H__ |
26 | |
OLD | NEW |