OSDN Git Service

Rename IPCHandlerUnix to IPCHandlerLinux
authorScott James Remnant <keybuk@google.com>
Wed, 23 Sep 2015 17:52:07 +0000 (10:52 -0700)
committerScott James Remnant <keybuk@google.com>
Mon, 28 Sep 2015 21:19:25 +0000 (14:19 -0700)
Since it relies on the Linux-specific sequential packet socket type,
rename the "Unix" IPC Handler to "Linux".

Change-Id: I04c4d6d3f73061099ebffb1ee3adfd0a20430dd7

service/Android.mk
service/BUILD.gn
service/daemon.cpp
service/ipc/ipc_handler_linux.cpp [moved from service/ipc/ipc_handler_unix.cpp with 82% similarity]
service/ipc/ipc_handler_linux.h [moved from service/ipc/ipc_handler_unix.h with 89% similarity]
service/ipc/ipc_manager.cpp
service/ipc/ipc_manager.h
service/ipc/linux_ipc_host.cpp [moved from service/ipc/unix_ipc_host.cpp with 91% similarity]
service/ipc/linux_ipc_host.h [moved from service/ipc/unix_ipc_host.h with 96% similarity]
service/test/ipc_linux_unittest.cpp [moved from service/test/ipc_unix_unittest.cpp with 85% similarity]

index 7c61fe0..3f95c8f 100644 (file)
@@ -28,15 +28,17 @@ btserviceCommonSrc := \
        hal/bluetooth_gatt_interface.cpp \
        hal/bluetooth_interface.cpp \
        ipc/ipc_handler.cpp \
-       ipc/ipc_handler_unix.cpp \
        ipc/ipc_manager.cpp \
-       ipc/unix_ipc_host.cpp \
        logging_helpers.cpp \
        low_energy_client.cpp \
        settings.cpp \
        util/atomic_string.cpp \
        uuid.cpp
 
+btserviceLinuxSrc := \
+       ipc/ipc_handler_linux.cpp \
+       ipc/linux_ipc_host.cpp
+
 btserviceBinderSrc := \
        ipc/binder/bluetooth_binder_server.cpp \
        ipc/binder/bluetooth_gatt_server_binder_server.cpp \
@@ -58,6 +60,7 @@ btserviceCommonIncludes := $(LOCAL_PATH)/../
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES := \
        $(btserviceBinderSrc) \
+       $(btserviceLinuxSrc) \
        $(btserviceCommonSrc) \
        main.cpp
 LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
@@ -82,12 +85,13 @@ ifeq ($(HOST_OS),linux)
 include $(CLEAR_VARS)
 LOCAL_SRC_FILES := \
        $(btserviceCommonSrc) \
+       $(btserviceLinuxSrc) \
        hal/fake_bluetooth_gatt_interface.cpp \
        hal/fake_bluetooth_interface.cpp \
        test/adapter_unittest.cpp \
        test/advertise_data_unittest.cpp \
        test/fake_hal_util.cpp \
-       test/ipc_unix_unittest.cpp \
+       test/ipc_linux_unittest.cpp \
        test/low_energy_client_unittest.cpp \
        test/settings_unittest.cpp \
        test/stub_ipc_handler_binder.cpp \
index b0bc6be..49e3899 100644 (file)
@@ -21,9 +21,9 @@ source_set("service") {
     "daemon.cpp",
     "gatt_server.cpp",
     "ipc/ipc_handler.cpp",
-    "ipc/ipc_handler_unix.cpp",
+    "ipc/ipc_handler_linux.cpp",
     "ipc/ipc_manager.cpp",
-    "ipc/unix_ipc_host.cpp",
+    "ipc/linux_ipc_host.cpp",
     "logging_helpers.cpp",
     "settings.cpp",
     "uuid.cpp"
@@ -59,7 +59,7 @@ executable("service_unittests") {
   testonly = true
   sources = [
     "test/fake_hal_util.cpp",
-    "test/ipc_unix_unittest.cpp",
+    "test/ipc_linux_unittest.cpp",
     "test/settings_unittest.cpp",
     "test/uuid_unittest.cpp",
   ]
index 9429f40..4b6463c 100644 (file)
@@ -90,7 +90,7 @@ class DaemonImpl : public Daemon {
     // If an IPC socket path was given, initialize IPC with it. Otherwise
     // initialize Binder IPC.
     if (settings_->UseSocketIPC()) {
-      if (!ipc_manager_->Start(ipc::IPCManager::TYPE_UNIX, nullptr)) {
+      if (!ipc_manager_->Start(ipc::IPCManager::TYPE_LINUX, nullptr)) {
         LOG(ERROR) << "Failed to set up UNIX domain-socket IPCManager";
         return false;
       }
similarity index 82%
rename from service/ipc/ipc_handler_unix.cpp
rename to service/ipc/ipc_handler_linux.cpp
index eaba84d..b9f181e 100644 (file)
@@ -14,7 +14,7 @@
 //  limitations under the License.
 //
 
-#include "service/ipc/ipc_handler_unix.h"
+#include "service/ipc/ipc_handler_linux.h"
 
 #include <sys/socket.h>
 #include <sys/un.h>
 
 #include "osi/include/socket_utils/sockets.h"
 #include "service/daemon.h"
-#include "service/ipc/unix_ipc_host.h"
+#include "service/ipc/linux_ipc_host.h"
 #include "service/settings.h"
 
 namespace ipc {
 
-IPCHandlerUnix::IPCHandlerUnix(bluetooth::Adapter* adapter,
+IPCHandlerLinux::IPCHandlerLinux(bluetooth::Adapter* adapter,
                                IPCManager::Delegate* delegate)
     : IPCHandler(adapter, delegate),
       running_(false),
-      thread_("IPCHandlerUnix"),
+      thread_("IPCHandlerLinux"),
       keep_running_(true) {
 }
 
-IPCHandlerUnix::~IPCHandlerUnix() {
+IPCHandlerLinux::~IPCHandlerLinux() {
   // This will only be set if the Settings::create_ipc_socket_path() was
   // originally provided.
   if (!socket_path_.empty())
     unlink(socket_path_.value().c_str());
 }
 
-bool IPCHandlerUnix::Run() {
+bool IPCHandlerLinux::Run() {
   CHECK(!running_);
 
   const std::string& android_suffix =
@@ -106,19 +106,19 @@ bool IPCHandlerUnix::Run() {
   // Start an IO thread and post the listening task.
   base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
   if (!thread_.StartWithOptions(options)) {
-    LOG(ERROR) << "Failed to start IPCHandlerUnix thread";
+    LOG(ERROR) << "Failed to start IPCHandlerLinux thread";
     running_ = false;
     return false;
   }
 
   thread_.task_runner()->PostTask(
       FROM_HERE,
-      base::Bind(&IPCHandlerUnix::StartListeningOnThread, this));
+      base::Bind(&IPCHandlerLinux::StartListeningOnThread, this));
 
   return true;
 }
 
-void IPCHandlerUnix::Stop() {
+void IPCHandlerLinux::Stop() {
   keep_running_ = false;
 
   // At this moment the listening thread might be blocking on the accept
@@ -135,7 +135,7 @@ void IPCHandlerUnix::Stop() {
   NotifyStoppedOnOriginThread();
 }
 
-void IPCHandlerUnix::StartListeningOnThread() {
+void IPCHandlerLinux::StartListeningOnThread() {
   CHECK(socket_.is_valid());
   CHECK(adapter());
   CHECK(running_);
@@ -147,7 +147,7 @@ void IPCHandlerUnix::StartListeningOnThread() {
     LOG(ERROR) << "Failed to listen on domain socket: " << strerror(errno);
     origin_task_runner_->PostTask(
         FROM_HERE,
-        base::Bind(&IPCHandlerUnix::ShutDownOnOriginThread, this));
+        base::Bind(&IPCHandlerLinux::ShutDownOnOriginThread, this));
     return;
   }
 
@@ -168,7 +168,7 @@ void IPCHandlerUnix::StartListeningOnThread() {
 
     LOG(INFO) << "Established client connection: fd=" << client_socket;
 
-    UnixIPCHost ipc_host(client_socket, adapter());
+    LinuxIPCHost ipc_host(client_socket, adapter());
 
     // TODO(armansito): Use |thread_|'s MessageLoopForIO instead of using a
     // custom event loop to poll from the socket.
@@ -176,40 +176,40 @@ void IPCHandlerUnix::StartListeningOnThread() {
   }
 }
 
-void IPCHandlerUnix::ShutDownOnOriginThread() {
-  LOG(INFO) << "Shutting down IPCHandlerUnix thread";
+void IPCHandlerLinux::ShutDownOnOriginThread() {
+  LOG(INFO) << "Shutting down IPCHandlerLinux thread";
   thread_.Stop();
   running_ = false;
 
   NotifyStoppedOnCurrentThread();
 }
 
-void IPCHandlerUnix::NotifyStartedOnOriginThread() {
+void IPCHandlerLinux::NotifyStartedOnOriginThread() {
   if (!delegate())
     return;
 
   origin_task_runner_->PostTask(
       FROM_HERE,
-      base::Bind(&IPCHandlerUnix::NotifyStartedOnCurrentThread, this));
+      base::Bind(&IPCHandlerLinux::NotifyStartedOnCurrentThread, this));
 }
 
-void IPCHandlerUnix::NotifyStartedOnCurrentThread() {
+void IPCHandlerLinux::NotifyStartedOnCurrentThread() {
   if (delegate())
-    delegate()->OnIPCHandlerStarted(IPCManager::TYPE_UNIX);
+    delegate()->OnIPCHandlerStarted(IPCManager::TYPE_LINUX);
 }
 
-void IPCHandlerUnix::NotifyStoppedOnOriginThread() {
+void IPCHandlerLinux::NotifyStoppedOnOriginThread() {
   if (!delegate())
     return;
 
   origin_task_runner_->PostTask(
       FROM_HERE,
-      base::Bind(&IPCHandlerUnix::NotifyStoppedOnCurrentThread, this));
+      base::Bind(&IPCHandlerLinux::NotifyStoppedOnCurrentThread, this));
 }
 
-void IPCHandlerUnix::NotifyStoppedOnCurrentThread() {
+void IPCHandlerLinux::NotifyStoppedOnCurrentThread() {
   if (delegate())
-    delegate()->OnIPCHandlerStopped(IPCManager::TYPE_UNIX);
+    delegate()->OnIPCHandlerStopped(IPCManager::TYPE_LINUX);
 }
 
 }  // namespace ipc
similarity index 89%
rename from service/ipc/ipc_handler_unix.h
rename to service/ipc/ipc_handler_linux.h
index 4b91740..4eaef59 100644 (file)
@@ -32,19 +32,19 @@ class SingleThreadTaskRunner;
 
 namespace ipc {
 
-// Implements a UNIX domain-socket based IPCHandler
-class IPCHandlerUnix : public IPCHandler {
+// Implements a Linux sequential packet domain-socket based IPCHandler
+class IPCHandlerLinux : public IPCHandler {
  public:
-  IPCHandlerUnix(bluetooth::Adapter* adapter,
+  IPCHandlerLinux(bluetooth::Adapter* adapter,
                  IPCManager::Delegate* delegate);
-  ~IPCHandlerUnix() override;
+  ~IPCHandlerLinux() override;
 
   // IPCHandler overrides:
   bool Run() override;
   void Stop() override;
 
  private:
-  IPCHandlerUnix() = default;
+  IPCHandlerLinux() = default;
 
   // Starts listening for incoming connections. Posted on |thread_| by Run().
   void StartListeningOnThread();
@@ -80,7 +80,7 @@ class IPCHandlerUnix : public IPCHandler {
   // The origin thread's task runner.
   scoped_refptr<base::SingleThreadTaskRunner> origin_task_runner_;
 
-  DISALLOW_COPY_AND_ASSIGN(IPCHandlerUnix);
+  DISALLOW_COPY_AND_ASSIGN(IPCHandlerLinux);
 };
 
 }  // namespace ipc
index 40d57a3..0aab054 100644 (file)
@@ -17,7 +17,7 @@
 #include "service/ipc/ipc_manager.h"
 
 #include "service/ipc/binder/ipc_handler_binder.h"
-#include "service/ipc/ipc_handler_unix.h"
+#include "service/ipc/ipc_handler_linux.h"
 
 namespace ipc {
 
@@ -31,21 +31,21 @@ IPCManager::~IPCManager() {
   // holding a reference to them. Instead, explicitly stop them here.
   if (BinderStarted())
     binder_handler_->Stop();
-  if (UnixStarted())
-    unix_handler_->Stop();
+  if (LinuxStarted())
+    linux_handler_->Stop();
 }
 
 bool IPCManager::Start(Type type, Delegate* delegate) {
   switch (type) {
-  case TYPE_UNIX:
-    if (UnixStarted()) {
-      LOG(ERROR) << "IPCManagerUnix already started.";
+  case TYPE_LINUX:
+    if (LinuxStarted()) {
+      LOG(ERROR) << "IPCManagerLinux already started.";
       return false;
     }
 
-    unix_handler_ = new IPCHandlerUnix(adapter_, delegate);
-    if (!unix_handler_->Run()) {
-      unix_handler_ = nullptr;
+    linux_handler_ = new IPCHandlerLinux(adapter_, delegate);
+    if (!linux_handler_->Run()) {
+      linux_handler_ = nullptr;
       return false;
     }
     return true;
@@ -74,8 +74,8 @@ bool IPCManager::BinderStarted() const {
   return binder_handler_.get();
 }
 
-bool IPCManager::UnixStarted() const {
-  return unix_handler_.get();
+bool IPCManager::LinuxStarted() const {
+  return linux_handler_.get();
 }
 
 }  // namespace ipc
index bac60aa..c0ade0e 100644 (file)
@@ -31,13 +31,13 @@ class IPCHandler;
 
 // IPCManager is a class for initializing and running supported IPC mechanisms.
 // It manages the life-time of different IPC flavors that are available on the
-// system. There are two flavors: a plain UNIX domain socket based system and
-// one based on the Binder-based android.bluetooth framework.
+// system. There are two flavors: a Linux sequential packet domain socket based
+// system and one based on the Binder-based android.bluetooth framework.
 class IPCManager {
  public:
   // Possible IPC types.
   enum Type {
-    TYPE_UNIX,  // IPC based on a UNIX domain socket
+    TYPE_LINUX,  // IPC based on a Linux sequential packet domain socket
     TYPE_BINDER  // IPC based on the Binder
   };
 
@@ -67,7 +67,7 @@ class IPCManager {
   // yet been initialized and returns true on success. Returns false if that
   // type has already been initialized or an error occurs.
   //
-  // If TYPE_UNIX is given, the file path to use for the domain socket will be
+  // If TYPE_LINUX is given, the file path to use for the domain socket will be
   // obtained from the global Settings object. Hence, the Settings object must
   // have been initialized before calling this method.
   //
@@ -80,7 +80,7 @@ class IPCManager {
 
   // Returns true if an IPC type has been initialized.
   bool BinderStarted() const;
-  bool UnixStarted() const;
+  bool LinuxStarted() const;
 
  private:
   IPCManager() = default;
@@ -88,7 +88,7 @@ class IPCManager {
   // Pointers to the different IPC handler classes. These are initialized and
   // owned by us.
   scoped_refptr<IPCHandler> binder_handler_;
-  scoped_refptr<IPCHandler> unix_handler_;
+  scoped_refptr<IPCHandler> linux_handler_;
 
   // The Bluetooth adapter instance. This is owned by Daemon so we keep a raw
   // pointer to it.
similarity index 91%
rename from service/ipc/unix_ipc_host.cpp
rename to service/ipc/linux_ipc_host.cpp
index 2f801d4..1e8d5c4 100644 (file)
@@ -16,7 +16,7 @@
 
 #define LOG_TAG "bt_bluetooth_host"
 
-#include "service/ipc/unix_ipc_host.h"
+#include "service/ipc/linux_ipc_host.h"
 
 #include <errno.h>
 #include <stdio.h>
@@ -58,9 +58,9 @@ const char kStartServiceCommand[] = "start-service";
 const char kStopServiceCommand[] = "stop-service";
 const char kWriteCharacteristicCommand[] = "write-characteristic";
 
-// Useful values for indexing UnixIPCHost::pfds_
+// Useful values for indexing LinuxIPCHost::pfds_
 // Not super general considering that we should be able to support
-// many GATT FDs owned by one UnixIPCHost.
+// many GATT FDs owned by one LinuxIPCHost.
 enum {
   kFdIpc = 0,
   kFdGatt = 1,
@@ -75,14 +75,14 @@ bool TokenBool(const std::string& text) {
 
 namespace ipc {
 
-UnixIPCHost::UnixIPCHost(int sockfd, Adapter* adapter)
+LinuxIPCHost::LinuxIPCHost(int sockfd, Adapter* adapter)
     : adapter_(adapter), pfds_(1, {sockfd, POLLIN, 0}) {}
 
-UnixIPCHost::~UnixIPCHost() {
+LinuxIPCHost::~LinuxIPCHost() {
   close(pfds_[0].fd);
 }
 
-bool UnixIPCHost::EventLoop() {
+bool LinuxIPCHost::EventLoop() {
   while (true) {
     int status =
         TEMP_FAILURE_RETRY(ppoll(pfds_.data(), pfds_.size(), nullptr, nullptr));
@@ -104,13 +104,13 @@ bool UnixIPCHost::EventLoop() {
   return true;
 }
 
-bool UnixIPCHost::OnSetAdapterName(const std::string& name) {
+bool LinuxIPCHost::OnSetAdapterName(const std::string& name) {
   std::string decoded_data;
   base::Base64Decode(name, &decoded_data);
   return adapter_->SetName(decoded_data);
 }
 
-bool UnixIPCHost::OnCreateService(const std::string& service_uuid) {
+bool LinuxIPCHost::OnCreateService(const std::string& service_uuid) {
   gatt_servers_[service_uuid] = std::unique_ptr<Server>(new Server);
 
   int gattfd;
@@ -125,14 +125,14 @@ bool UnixIPCHost::OnCreateService(const std::string& service_uuid) {
   return true;
 }
 
-bool UnixIPCHost::OnDestroyService(const std::string& service_uuid) {
+bool LinuxIPCHost::OnDestroyService(const std::string& service_uuid) {
   gatt_servers_.erase(service_uuid);
   close(pfds_[1].fd);
   pfds_.resize(1);
   return true;
 }
 
-bool UnixIPCHost::OnAddCharacteristic(const std::string& service_uuid,
+bool LinuxIPCHost::OnAddCharacteristic(const std::string& service_uuid,
                                const std::string& characteristic_uuid,
                                const std::string& control_uuid,
                                const std::string& options) {
@@ -170,7 +170,7 @@ bool UnixIPCHost::OnAddCharacteristic(const std::string& service_uuid,
   return true;
 }
 
-bool UnixIPCHost::OnSetCharacteristicValue(const std::string& service_uuid,
+bool LinuxIPCHost::OnSetCharacteristicValue(const std::string& service_uuid,
                                     const std::string& characteristic_uuid,
                                     const std::string& value) {
   std::string decoded_data;
@@ -181,7 +181,7 @@ bool UnixIPCHost::OnSetCharacteristicValue(const std::string& service_uuid,
   return true;
 }
 
-bool UnixIPCHost::OnSetAdvertisement(const std::string& service_uuid,
+bool LinuxIPCHost::OnSetAdvertisement(const std::string& service_uuid,
                               const std::string& advertise_uuids,
                               const std::string& advertise_data,
                               const std::string& manufacturer_data,
@@ -212,7 +212,7 @@ bool UnixIPCHost::OnSetAdvertisement(const std::string& service_uuid,
   return true;
 }
 
-bool UnixIPCHost::OnSetScanResponse(const std::string& service_uuid,
+bool LinuxIPCHost::OnSetScanResponse(const std::string& service_uuid,
                              const std::string& scan_response_uuids,
                              const std::string& scan_response_data,
                              const std::string& manufacturer_data,
@@ -240,15 +240,15 @@ bool UnixIPCHost::OnSetScanResponse(const std::string& service_uuid,
   return true;
 }
 
-bool UnixIPCHost::OnStartService(const std::string& service_uuid) {
+bool LinuxIPCHost::OnStartService(const std::string& service_uuid) {
   return gatt_servers_[service_uuid]->Start();
 }
 
-bool UnixIPCHost::OnStopService(const std::string& service_uuid) {
+bool LinuxIPCHost::OnStopService(const std::string& service_uuid) {
   return gatt_servers_[service_uuid]->Stop();
 }
 
-bool UnixIPCHost::OnMessage() {
+bool LinuxIPCHost::OnMessage() {
   std::string ipc_msg;
   int size = recv(pfds_[kFdIpc].fd, &ipc_msg[0], 0, MSG_PEEK | MSG_TRUNC);
   if (-1 == size) {
@@ -306,7 +306,7 @@ bool UnixIPCHost::OnMessage() {
   return false;
 }
 
-bool UnixIPCHost::OnGattWrite() {
+bool LinuxIPCHost::OnGattWrite() {
   UUID::UUID128Bit id;
   int r = read(pfds_[kFdGatt].fd, id.data(), id.size());
   if (r != id.size()) {
similarity index 96%
rename from service/ipc/unix_ipc_host.h
rename to service/ipc/linux_ipc_host.h
index 1ebf60a..131f537 100644 (file)
@@ -34,11 +34,11 @@ namespace ipc {
 // reads from a set of FDs (pfds_) to a set of handlers.
 // Reads from the GATT pipe read end will result in a write to
 // to the IPC socket, and vise versa.
-class UnixIPCHost {
+class LinuxIPCHost {
  public:
-  // UnixIPCHost owns the passed sockfd.
-  UnixIPCHost(int sockfd, bluetooth::Adapter* adapter);
-  ~UnixIPCHost();
+  // LinuxIPCHost owns the passed sockfd.
+  LinuxIPCHost(int sockfd, bluetooth::Adapter* adapter);
+  ~LinuxIPCHost();
 
   // Synchronously handle all events on input FDs.
   bool EventLoop();
similarity index 85%
rename from service/test/ipc_unix_unittest.cpp
rename to service/test/ipc_linux_unittest.cpp
index 4d0c866..4e057e2 100644 (file)
@@ -40,10 +40,10 @@ using testing::Return;
 
 const char kTestSocketPath[] = "test_socket_path";
 
-class IPCUnixTest : public ::testing::Test {
+class IPCLinuxTest : public ::testing::Test {
  public:
-  IPCUnixTest() = default;
-  ~IPCUnixTest() override = default;
+  IPCLinuxTest() = default;
+  ~IPCLinuxTest() override = default;
 
   void SetUp() override {
     SetUpCommandLine();
@@ -107,13 +107,13 @@ class IPCUnixTest : public ::testing::Test {
   std::unique_ptr<ipc::IPCManager> ipc_manager_;
   base::ScopedFD client_fd_;
 
-  DISALLOW_COPY_AND_ASSIGN(IPCUnixTest);
+  DISALLOW_COPY_AND_ASSIGN(IPCLinuxTest);
 };
 
-class IPCUnixTestDisabled : public IPCUnixTest {
+class IPCLinuxTestDisabled : public IPCLinuxTest {
  public:
-  IPCUnixTestDisabled() = default;
-  ~IPCUnixTestDisabled() override = default;
+  IPCLinuxTestDisabled() = default;
+  ~IPCLinuxTestDisabled() override = default;
 
   void SetUpCommandLine() override {
     // Set up with no --ipc-socket-path
@@ -122,7 +122,7 @@ class IPCUnixTestDisabled : public IPCUnixTest {
   }
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(IPCUnixTestDisabled);
+  DISALLOW_COPY_AND_ASSIGN(IPCLinuxTestDisabled);
 };
 
 class TestDelegate : public ipc::IPCManager::Delegate,
@@ -132,13 +132,13 @@ class TestDelegate : public ipc::IPCManager::Delegate,
   }
 
   void OnIPCHandlerStarted(ipc::IPCManager::Type type) override {
-    ASSERT_EQ(ipc::IPCManager::TYPE_UNIX, type);
+    ASSERT_EQ(ipc::IPCManager::TYPE_LINUX, type);
     started_count_++;
     base::MessageLoop::current()->Quit();
   }
 
   void OnIPCHandlerStopped(ipc::IPCManager::Type type) override {
-    ASSERT_EQ(ipc::IPCManager::TYPE_UNIX, type);
+    ASSERT_EQ(ipc::IPCManager::TYPE_LINUX, type);
     stopped_count_++;
     base::MessageLoop::current()->Quit();
   }
@@ -153,18 +153,18 @@ class TestDelegate : public ipc::IPCManager::Delegate,
   DISALLOW_COPY_AND_ASSIGN(TestDelegate);
 };
 
-TEST_F(IPCUnixTestDisabled, StartWithNoSocketPath) {
+TEST_F(IPCLinuxTestDisabled, StartWithNoSocketPath) {
   TestDelegate delegate;
-  EXPECT_FALSE(ipc_manager_->Start(ipc::IPCManager::TYPE_UNIX, &delegate));
-  EXPECT_FALSE(ipc_manager_->UnixStarted());
+  EXPECT_FALSE(ipc_manager_->Start(ipc::IPCManager::TYPE_LINUX, &delegate));
+  EXPECT_FALSE(ipc_manager_->LinuxStarted());
   EXPECT_EQ(0, delegate.started_count());
   EXPECT_EQ(0, delegate.stopped_count());
 }
 
-TEST_F(IPCUnixTest, BasicStartAndExit) {
+TEST_F(IPCLinuxTest, BasicStartAndExit) {
   TestDelegate delegate;
-  EXPECT_TRUE(ipc_manager_->Start(ipc::IPCManager::TYPE_UNIX, &delegate));
-  EXPECT_TRUE(ipc_manager_->UnixStarted());
+  EXPECT_TRUE(ipc_manager_->Start(ipc::IPCManager::TYPE_LINUX, &delegate));
+  EXPECT_TRUE(ipc_manager_->LinuxStarted());
 
   // Run the message loop. We will stop the loop when we receive a delegate
   // event.
@@ -182,10 +182,10 @@ TEST_F(IPCUnixTest, BasicStartAndExit) {
   EXPECT_EQ(1, delegate.stopped_count());
 }
 
-TEST_F(IPCUnixTest, BasicStartAndConnect) {
+TEST_F(IPCLinuxTest, BasicStartAndConnect) {
   TestDelegate delegate;
-  EXPECT_TRUE(ipc_manager_->Start(ipc::IPCManager::TYPE_UNIX, &delegate));
-  EXPECT_TRUE(ipc_manager_->UnixStarted());
+  EXPECT_TRUE(ipc_manager_->Start(ipc::IPCManager::TYPE_LINUX, &delegate));
+  EXPECT_TRUE(ipc_manager_->LinuxStarted());
 
   // Run the message loop. We will stop the loop when we receive a delegate
   // event.