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

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

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/socket/udp_socket_posix.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/socket_posix.h" 5 #include "net/socket/socket_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <netinet/in.h> 8 #include <netinet/in.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <utility> 10 #include <utility>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return ERR_CONNECTION_FAILED; // More specific than ERR_FAILED. 53 return ERR_CONNECTION_FAILED; // More specific than ERR_FAILED.
54 return net_error; 54 return net_error;
55 } 55 }
56 } 56 }
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 SocketPosix::SocketPosix() 61 SocketPosix::SocketPosix()
62 : socket_fd_(kInvalidSocket), 62 : socket_fd_(kInvalidSocket),
63 accept_socket_watcher_(FROM_HERE),
64 read_socket_watcher_(FROM_HERE),
63 read_buf_len_(0), 65 read_buf_len_(0),
66 write_socket_watcher_(FROM_HERE),
64 write_buf_len_(0), 67 write_buf_len_(0),
65 waiting_connect_(false) {} 68 waiting_connect_(false) {}
66 69
67 SocketPosix::~SocketPosix() { 70 SocketPosix::~SocketPosix() {
68 Close(); 71 Close();
69 } 72 }
70 73
71 int SocketPosix::Open(int address_family) { 74 int SocketPosix::Open(int address_family) {
72 DCHECK(thread_checker_.CalledOnValidThread()); 75 DCHECK(thread_checker_.CalledOnValidThread());
73 DCHECK_EQ(kInvalidSocket, socket_fd_); 76 DCHECK_EQ(kInvalidSocket, socket_fd_);
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 write_buf_ = NULL; 513 write_buf_ = NULL;
511 write_buf_len_ = 0; 514 write_buf_len_ = 0;
512 write_callback_.Reset(); 515 write_callback_.Reset();
513 } 516 }
514 517
515 waiting_connect_ = false; 518 waiting_connect_ = false;
516 peer_address_.reset(); 519 peer_address_.reset();
517 } 520 }
518 521
519 } // namespace net 522 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_linux.cc ('k') | net/socket/udp_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698