summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authortfarina <tfarina@chromium.org>2016-02-01 18:03:49 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-02 02:05:22 +0000
commita7b245d36350cba9de115ba0302e631dc031b586 (patch)
tree6662e38ae662dc5ec18e563797abb1438f2679e5 /remoting
parente79217e25874964f67d8053676c2e8c5f591bb76 (diff)
downloadchromium_src-a7b245d36350cba9de115ba0302e631dc031b586.zip
chromium_src-a7b245d36350cba9de115ba0302e631dc031b586.tar.gz
chromium_src-a7b245d36350cba9de115ba0302e631dc031b586.tar.bz2
net: add BindAndListen() method to UnixDomainServerSocket
This method was designed to support the Unix Domain Socket case, where the address + port pair does not make sense, as it uses files for sockets instead. This makes the callsites cleaner. With this addition there is no need to override ListenWithAddressAndPort from ServerSocket. BUG=None TEST=net_unittests R=mmenke@chromium.org,mkwst@chromium.org TBR=gunsch@chromium.org,boliu@chromium.org,sergeyu@chromium.org,newt@chromium.org Review URL: https://codereview.chromium.org/1644003002 Cr-Commit-Position: refs/heads/master@{#372859}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/gnubby_auth_handler_posix.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/remoting/host/gnubby_auth_handler_posix.cc b/remoting/host/gnubby_auth_handler_posix.cc
index 5592b3a..4960e0d 100644
--- a/remoting/host/gnubby_auth_handler_posix.cc
+++ b/remoting/host/gnubby_auth_handler_posix.cc
@@ -257,8 +257,8 @@ void GnubbyAuthHandlerPosix::CreateAuthorizationSocket() {
auth_socket_.reset(
new net::UnixDomainServerSocket(base::Bind(MatchUid), false));
- int rv = auth_socket_->ListenWithAddressAndPort(
- g_gnubby_socket_name.Get().value(), 0, 1);
+ int rv = auth_socket_->BindAndListen(g_gnubby_socket_name.Get().value(),
+ /*backlog=*/1);
if (rv != net::OK) {
LOG(ERROR) << "Failed to open socket for gnubby requests";
return;