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

Side by Side Diff: net/socket/tcp_client_socket_libevent.cc

Issue 164114: Rebaseline block-test* tests for Mac.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « no previous file | webkit/data/layout_tests/platform/chromium-mac/LayoutTests/security/block-test-expected.txt » ('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) 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 #include "net/socket/tcp_client_socket_libevent.h" 5 #include "net/socket/tcp_client_socket_libevent.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 25 matching lines...) Expand all
36 // Convert values from <errno.h> to values from "net/base/net_errors.h" 36 // Convert values from <errno.h> to values from "net/base/net_errors.h"
37 int MapPosixError(int err) { 37 int MapPosixError(int err) {
38 // There are numerous posix error codes, but these are the ones we thus far 38 // There are numerous posix error codes, but these are the ones we thus far
39 // find interesting. 39 // find interesting.
40 switch (err) { 40 switch (err) {
41 case EAGAIN: 41 case EAGAIN:
42 #if EWOULDBLOCK != EAGAIN 42 #if EWOULDBLOCK != EAGAIN
43 case EWOULDBLOCK: 43 case EWOULDBLOCK:
44 #endif 44 #endif
45 return ERR_IO_PENDING; 45 return ERR_IO_PENDING;
46 case EACCES:
47 return ERR_ACCESS_DENIED;
46 case ENETDOWN: 48 case ENETDOWN:
47 return ERR_INTERNET_DISCONNECTED; 49 return ERR_INTERNET_DISCONNECTED;
48 case ETIMEDOUT: 50 case ETIMEDOUT:
49 return ERR_TIMED_OUT; 51 return ERR_TIMED_OUT;
50 case ECONNRESET: 52 case ECONNRESET:
51 case ENETRESET: // Related to keep-alive 53 case ENETRESET: // Related to keep-alive
52 return ERR_CONNECTION_RESET; 54 return ERR_CONNECTION_RESET;
53 case ECONNABORTED: 55 case ECONNABORTED:
54 return ERR_CONNECTION_ABORTED; 56 return ERR_CONNECTION_ABORTED;
55 case ECONNREFUSED: 57 case ECONNREFUSED:
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 DoWriteCallback(result); 375 DoWriteCallback(result);
374 } 376 }
375 } 377 }
376 378
377 int TCPClientSocketLibevent::GetPeerName(struct sockaddr *name, 379 int TCPClientSocketLibevent::GetPeerName(struct sockaddr *name,
378 socklen_t *namelen) { 380 socklen_t *namelen) {
379 return ::getpeername(socket_, name, namelen); 381 return ::getpeername(socket_, name, namelen);
380 } 382 }
381 383
382 } // namespace net 384 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | webkit/data/layout_tests/platform/chromium-mac/LayoutTests/security/block-test-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698