| 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 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 | 144 |
| 145 NextProto UnixDomainClientSocket::GetNegotiatedProtocol() const { | 145 NextProto UnixDomainClientSocket::GetNegotiatedProtocol() const { |
| 146 return kProtoUnknown; | 146 return kProtoUnknown; |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool UnixDomainClientSocket::GetSSLInfo(SSLInfo* ssl_info) { | 149 bool UnixDomainClientSocket::GetSSLInfo(SSLInfo* ssl_info) { |
| 150 return false; | 150 return false; |
| 151 } | 151 } |
| 152 | 152 |
| 153 void UnixDomainClientSocket::GetConnectionAttempts( |
| 154 ConnectionAttempts* out) const { |
| 155 out->clear(); |
| 156 } |
| 157 |
| 153 int UnixDomainClientSocket::Read(IOBuffer* buf, int buf_len, | 158 int UnixDomainClientSocket::Read(IOBuffer* buf, int buf_len, |
| 154 const CompletionCallback& callback) { | 159 const CompletionCallback& callback) { |
| 155 DCHECK(socket_); | 160 DCHECK(socket_); |
| 156 return socket_->Read(buf, buf_len, callback); | 161 return socket_->Read(buf, buf_len, callback); |
| 157 } | 162 } |
| 158 | 163 |
| 159 int UnixDomainClientSocket::Write(IOBuffer* buf, int buf_len, | 164 int UnixDomainClientSocket::Write(IOBuffer* buf, int buf_len, |
| 160 const CompletionCallback& callback) { | 165 const CompletionCallback& callback) { |
| 161 DCHECK(socket_); | 166 DCHECK(socket_); |
| 162 return socket_->Write(buf, buf_len, callback); | 167 return socket_->Write(buf, buf_len, callback); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 175 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { | 180 SocketDescriptor UnixDomainClientSocket::ReleaseConnectedSocket() { |
| 176 DCHECK(socket_); | 181 DCHECK(socket_); |
| 177 DCHECK(socket_->IsConnected()); | 182 DCHECK(socket_->IsConnected()); |
| 178 | 183 |
| 179 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); | 184 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); |
| 180 socket_.reset(); | 185 socket_.reset(); |
| 181 return socket_fd; | 186 return socket_fd; |
| 182 } | 187 } |
| 183 | 188 |
| 184 } // namespace net | 189 } // namespace net |
| OLD | NEW |