OLD | NEW |
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/unix_domain_client_socket_posix.h" | 5 #include "net/socket/unix_domain_client_socket_posix.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/un.h> | 8 #include <sys/un.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Unix domain sockets have no valid associated addr/port; | 111 // Unix domain sockets have no valid associated addr/port; |
112 // return either not connected or address invalid. | 112 // return either not connected or address invalid. |
113 DCHECK(address); | 113 DCHECK(address); |
114 | 114 |
115 if (!socket_) | 115 if (!socket_) |
116 return ERR_SOCKET_NOT_CONNECTED; | 116 return ERR_SOCKET_NOT_CONNECTED; |
117 | 117 |
118 return ERR_ADDRESS_INVALID; | 118 return ERR_ADDRESS_INVALID; |
119 } | 119 } |
120 | 120 |
121 const BoundNetLog& UnixDomainClientSocket::NetLog() const { | 121 const NetLogWithSource& UnixDomainClientSocket::NetLog() const { |
122 return net_log_; | 122 return net_log_; |
123 } | 123 } |
124 | 124 |
125 void UnixDomainClientSocket::SetSubresourceSpeculation() { | 125 void UnixDomainClientSocket::SetSubresourceSpeculation() { |
126 } | 126 } |
127 | 127 |
128 void UnixDomainClientSocket::SetOmniboxSpeculation() { | 128 void UnixDomainClientSocket::SetOmniboxSpeculation() { |
129 } | 129 } |
130 | 130 |
131 bool UnixDomainClientSocket::WasEverUsed() const { | 131 bool UnixDomainClientSocket::WasEverUsed() const { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { | 179 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { |
180 DCHECK(socket_); | 180 DCHECK(socket_); |
181 DCHECK(socket_->IsConnected()); | 181 DCHECK(socket_->IsConnected()); |
182 | 182 |
183 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); | 183 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); |
184 socket_.reset(); | 184 socket_.reset(); |
185 return socket_fd; | 185 return socket_fd; |
186 } | 186 } |
187 | 187 |
188 } // namespace net | 188 } // namespace net |
OLD | NEW |