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 "mojo/shell/domain_socket/unix_domain_client_socket_posix.h" | 5 #include "shell/domain_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" |
11 #include "base/posix/eintr_wrapper.h" | 11 #include "base/posix/eintr_wrapper.h" |
12 #include "mojo/shell/domain_socket/net_errors.h" | 12 #include "shell/domain_socket/net_errors.h" |
13 #include "mojo/shell/domain_socket/socket_libevent.h" | 13 #include "shell/domain_socket/socket_libevent.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 namespace shell { | 16 namespace shell { |
17 | 17 |
18 UnixDomainClientSocket::UnixDomainClientSocket(const std::string& socket_path, | 18 UnixDomainClientSocket::UnixDomainClientSocket(const std::string& socket_path, |
19 bool use_abstract_namespace) | 19 bool use_abstract_namespace) |
20 : socket_path_(socket_path), | 20 : socket_path_(socket_path), |
21 use_abstract_namespace_(use_abstract_namespace) { | 21 use_abstract_namespace_(use_abstract_namespace) { |
22 } | 22 } |
23 | 23 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 DCHECK(socket_); | 100 DCHECK(socket_); |
101 DCHECK(socket_->IsConnected()); | 101 DCHECK(socket_->IsConnected()); |
102 | 102 |
103 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); | 103 SocketDescriptor socket_fd = socket_->ReleaseConnectedSocket(); |
104 socket_.reset(); | 104 socket_.reset(); |
105 return socket_fd; | 105 return socket_fd; |
106 } | 106 } |
107 | 107 |
108 } // namespace shell | 108 } // namespace shell |
109 } // namespace mojo | 109 } // namespace mojo |
OLD | NEW |