| Index: shell/domain_socket/socket_libevent.cc
|
| diff --git a/mojo/shell/domain_socket/socket_libevent.cc b/shell/domain_socket/socket_libevent.cc
|
| similarity index 95%
|
| rename from mojo/shell/domain_socket/socket_libevent.cc
|
| rename to shell/domain_socket/socket_libevent.cc
|
| index cf4bd7912881e66ca994b474f44f5e16d95bc5eb..21fc92438728dd87b618ed230a0347b0d20b83ae 100644
|
| --- a/mojo/shell/domain_socket/socket_libevent.cc
|
| +++ b/shell/domain_socket/socket_libevent.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "mojo/shell/domain_socket/socket_libevent.h"
|
| +#include "shell/domain_socket/socket_libevent.h"
|
|
|
| #include <errno.h>
|
| #include <fcntl.h>
|
| @@ -13,7 +13,7 @@
|
| #include "base/callback_helpers.h"
|
| #include "base/logging.h"
|
| #include "base/posix/eintr_wrapper.h"
|
| -#include "mojo/shell/domain_socket/net_errors.h"
|
| +#include "shell/domain_socket/net_errors.h"
|
|
|
| namespace mojo {
|
| namespace shell {
|
| @@ -90,8 +90,7 @@ int SocketLibevent::Open(int address_family) {
|
| #ifdef SOCK_NONBLOCK
|
| socket_type |= SOCK_NONBLOCK;
|
| #endif
|
| - socket_fd_ = ::socket(address_family,
|
| - socket_type,
|
| + socket_fd_ = ::socket(address_family, socket_type,
|
| address_family == AF_UNIX ? 0 : IPPROTO_TCP);
|
| #ifndef SOCK_NONBLOCK
|
| if (SetNonBlocking(socket_fd_) != 0) {
|
| @@ -171,11 +170,8 @@ int SocketLibevent::Accept(scoped_ptr<SocketLibevent>* socket,
|
| return rv;
|
|
|
| if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
|
| - socket_fd_,
|
| - true,
|
| - base::MessageLoopForIO::WATCH_READ,
|
| - &accept_socket_watcher_,
|
| - this)) {
|
| + socket_fd_, true, base::MessageLoopForIO::WATCH_READ,
|
| + &accept_socket_watcher_, this)) {
|
| PLOG(ERROR) << "WatchFileDescriptor failed on accept, errno " << errno;
|
| return net::MapSystemError(errno);
|
| }
|
| @@ -199,11 +195,8 @@ int SocketLibevent::Connect(const SockaddrStorage& address,
|
| return rv;
|
|
|
| if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
|
| - socket_fd_,
|
| - true,
|
| - base::MessageLoopForIO::WATCH_WRITE,
|
| - &write_socket_watcher_,
|
| - this)) {
|
| + socket_fd_, true, base::MessageLoopForIO::WATCH_WRITE,
|
| + &write_socket_watcher_, this)) {
|
| PLOG(ERROR) << "WatchFileDescriptor failed on connect, errno " << errno;
|
| return net::MapSystemError(errno);
|
| }
|
|
|