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 #include "net/base/net_errors.h" | 5 #include "net/base/net_errors.h" |
6 | 6 |
7 #include <winsock2.h> | 7 #include <winsock2.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 case WSAECONNRESET: | 30 case WSAECONNRESET: |
31 case WSAENETRESET: // Related to keep-alive | 31 case WSAENETRESET: // Related to keep-alive |
32 return ERR_CONNECTION_RESET; | 32 return ERR_CONNECTION_RESET; |
33 case WSAECONNABORTED: | 33 case WSAECONNABORTED: |
34 return ERR_CONNECTION_ABORTED; | 34 return ERR_CONNECTION_ABORTED; |
35 case WSAECONNREFUSED: | 35 case WSAECONNREFUSED: |
36 return ERR_CONNECTION_REFUSED; | 36 return ERR_CONNECTION_REFUSED; |
37 case WSA_IO_INCOMPLETE: | 37 case WSA_IO_INCOMPLETE: |
38 case WSAEDISCON: | 38 case WSAEDISCON: |
39 return ERR_CONNECTION_CLOSED; | 39 return ERR_CONNECTION_CLOSED; |
| 40 case WSAEISCONN: |
| 41 return ERR_SOCKET_IS_CONNECTED; |
40 case WSAEHOSTUNREACH: | 42 case WSAEHOSTUNREACH: |
41 case WSAENETUNREACH: | 43 case WSAENETUNREACH: |
42 return ERR_ADDRESS_UNREACHABLE; | 44 return ERR_ADDRESS_UNREACHABLE; |
43 case WSAEADDRNOTAVAIL: | 45 case WSAEADDRNOTAVAIL: |
44 return ERR_ADDRESS_INVALID; | 46 return ERR_ADDRESS_INVALID; |
45 case WSAEMSGSIZE: | 47 case WSAEMSGSIZE: |
46 return ERR_MSG_TOO_BIG; | 48 return ERR_MSG_TOO_BIG; |
47 case WSAENOTCONN: | 49 case WSAENOTCONN: |
48 return ERR_SOCKET_NOT_CONNECTED; | 50 return ERR_SOCKET_NOT_CONNECTED; |
49 case WSAEAFNOSUPPORT: | 51 case WSAEAFNOSUPPORT: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 case ERROR_SUCCESS: | 114 case ERROR_SUCCESS: |
113 return OK; | 115 return OK; |
114 default: | 116 default: |
115 LOG(WARNING) << "Unknown error " << os_error | 117 LOG(WARNING) << "Unknown error " << os_error |
116 << " mapped to net::ERR_FAILED"; | 118 << " mapped to net::ERR_FAILED"; |
117 return ERR_FAILED; | 119 return ERR_FAILED; |
118 } | 120 } |
119 } | 121 } |
120 | 122 |
121 } // namespace net | 123 } // namespace net |
OLD | NEW |