Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Unified Diff: ipc/ipc_channel_handle_acceptor.cc

Issue 305973002: Rename IPC::ChannelFactory to ChannelHandleAcceptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing GN build Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ipc/ipc_channel_handle_acceptor.h ('K') | « ipc/ipc_channel_handle_acceptor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_handle_acceptor.cc
diff --git a/ipc/ipc_channel_factory.cc b/ipc/ipc_channel_handle_acceptor.cc
similarity index 80%
rename from ipc/ipc_channel_factory.cc
rename to ipc/ipc_channel_handle_acceptor.cc
index 244024c2f6dcf42bb0b8288ed3298b0547a6857e..78f0fdf051c9412c5f985ce3d4451ba1a9e8a5fb 100644
--- a/ipc/ipc_channel_factory.cc
+++ b/ipc/ipc_channel_handle_acceptor.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 "ipc/ipc_channel_factory.h"
+#include "ipc/ipc_channel_handle_acceptor.h"
#include "base/file_util.h"
#include "base/files/scoped_file.h"
@@ -11,24 +11,25 @@
namespace IPC {
-ChannelFactory::ChannelFactory(const base::FilePath& path, Delegate* delegate)
+ChannelHandleAcceptor::ChannelHandleAcceptor(const base::FilePath& path,
+ Delegate* delegate)
: path_(path), delegate_(delegate), listen_fd_(-1) {
DCHECK(delegate_);
CreateSocket();
}
-ChannelFactory::~ChannelFactory() {
+ChannelHandleAcceptor::~ChannelHandleAcceptor() {
Close();
}
-bool ChannelFactory::CreateSocket() {
+bool ChannelHandleAcceptor::CreateSocket() {
DCHECK(listen_fd_ < 0);
// Create the socket.
return CreateServerUnixDomainSocket(path_, &listen_fd_);
}
-bool ChannelFactory::Listen() {
+bool ChannelHandleAcceptor::Listen() {
if (listen_fd_ < 0)
return false;
@@ -44,7 +45,7 @@ bool ChannelFactory::Listen() {
}
// Called by libevent when we can read from the fd without blocking.
-void ChannelFactory::OnFileCanReadWithoutBlocking(int fd) {
+void ChannelHandleAcceptor::OnFileCanReadWithoutBlocking(int fd) {
DCHECK(fd == listen_fd_);
int new_fd = -1;
if (!ServerAcceptConnection(listen_fd_, &new_fd)) {
@@ -69,11 +70,11 @@ void ChannelFactory::OnFileCanReadWithoutBlocking(int fd) {
delegate_->OnClientConnected(handle);
}
-void ChannelFactory::OnFileCanWriteWithoutBlocking(int fd) {
+void ChannelHandleAcceptor::OnFileCanWriteWithoutBlocking(int fd) {
NOTREACHED() << "Listen fd should never be writable.";
}
-void ChannelFactory::Close() {
+void ChannelHandleAcceptor::Close() {
if (listen_fd_ < 0)
return;
if (IGNORE_EINTR(close(listen_fd_)) < 0)
« ipc/ipc_channel_handle_acceptor.h ('K') | « ipc/ipc_channel_handle_acceptor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698