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

Side by Side Diff: net/base/net_errors_posix.cc

Issue 14666002: Adding ERR_SOCKET_IS_CONNECTED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to origin/master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors_win.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) 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 <errno.h> 7 #include <errno.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string> 9 #include <string>
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 case EHOSTDOWN: 44 case EHOSTDOWN:
45 case ENETUNREACH: 45 case ENETUNREACH:
46 case EAFNOSUPPORT: 46 case EAFNOSUPPORT:
47 return ERR_ADDRESS_UNREACHABLE; 47 return ERR_ADDRESS_UNREACHABLE;
48 case EADDRNOTAVAIL: 48 case EADDRNOTAVAIL:
49 return ERR_ADDRESS_INVALID; 49 return ERR_ADDRESS_INVALID;
50 case EMSGSIZE: 50 case EMSGSIZE:
51 return ERR_MSG_TOO_BIG; 51 return ERR_MSG_TOO_BIG;
52 case ENOTCONN: 52 case ENOTCONN:
53 return ERR_SOCKET_NOT_CONNECTED; 53 return ERR_SOCKET_NOT_CONNECTED;
54 case EISCONN:
55 return ERR_SOCKET_IS_CONNECTED;
54 case EINVAL: 56 case EINVAL:
55 return ERR_INVALID_ARGUMENT; 57 return ERR_INVALID_ARGUMENT;
56 case EADDRINUSE: 58 case EADDRINUSE:
57 return ERR_ADDRESS_IN_USE; 59 return ERR_ADDRESS_IN_USE;
58 case E2BIG: // Argument list too long. 60 case E2BIG: // Argument list too long.
59 return ERR_INVALID_ARGUMENT; 61 return ERR_INVALID_ARGUMENT;
60 case EBADF: // Bad file descriptor. 62 case EBADF: // Bad file descriptor.
61 return ERR_INVALID_HANDLE; 63 return ERR_INVALID_HANDLE;
62 case EBUSY: // Device or resource busy. 64 case EBUSY: // Device or resource busy.
63 return ERR_INSUFFICIENT_RESOURCES; 65 return ERR_INSUFFICIENT_RESOURCES;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 case 0: 113 case 0:
112 return OK; 114 return OK;
113 default: 115 default:
114 LOG(WARNING) << "Unknown error " << os_error 116 LOG(WARNING) << "Unknown error " << os_error
115 << " mapped to net::ERR_FAILED"; 117 << " mapped to net::ERR_FAILED";
116 return ERR_FAILED; 118 return ERR_FAILED;
117 } 119 }
118 } 120 }
119 121
120 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698