Move CreateSocketPair to header file

Move function CreateSocketPair from base/posix/unix_domain_socket_linux.cc to
base/posix/unix_domain_socket_linux.h so it can be shared.

Review-Url: https://codereview.chromium.org/2779033002
Cr-Commit-Position: refs/heads/master@{#462350}


CrOS-Libchrome-Original-Commit: 6a52479520c587fc61eb3106f27ac6bd396fa736
diff --git a/base/posix/unix_domain_socket_linux.cc b/base/posix/unix_domain_socket_linux.cc
index 8b3094e..6b445c6 100644
--- a/base/posix/unix_domain_socket_linux.cc
+++ b/base/posix/unix_domain_socket_linux.cc
@@ -26,10 +26,7 @@
 const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
 
 #if !defined(OS_NACL_NONSFI)
-// Creates a connected pair of UNIX-domain SOCK_SEQPACKET sockets, and passes
-// ownership of the newly allocated file descriptors to |one| and |two|.
-// Returns true on success.
-static bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
+bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
   int raw_socks[2];
   if (socketpair(AF_UNIX, SOCK_SEQPACKET, 0, raw_socks) == -1)
     return false;
diff --git a/base/posix/unix_domain_socket_linux.h b/base/posix/unix_domain_socket_linux.h
index 2ba739e..84e7d16 100644
--- a/base/posix/unix_domain_socket_linux.h
+++ b/base/posix/unix_domain_socket_linux.h
@@ -19,6 +19,13 @@
 
 class Pickle;
 
+#if !defined(OS_NACL_NONSFI)
+// Creates a connected pair of UNIX-domain SOCK_SEQPACKET sockets, and passes
+// ownership of the newly allocated file descriptors to |one| and |two|.
+// Returns true on success.
+bool BASE_EXPORT CreateSocketPair(ScopedFD* one, ScopedFD* two);
+#endif
+
 class BASE_EXPORT UnixDomainSocket {
  public:
   // Maximum number of file descriptors that can be read by RecvMsg().