Index: chrome/browser/chromeos/web_socket_proxy.cc |
diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc |
index f1ef630b9df4d09faf98c104849e002946204390..4edae06bb42b413c7cb71f4a2fce11c04791d6e2 100644 |
--- a/chrome/browser/chromeos/web_socket_proxy.cc |
+++ b/chrome/browser/chromeos/web_socket_proxy.cc |
@@ -32,6 +32,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/message_loop.h" |
+#include "base/process_util.h" |
#include "base/sequenced_task_runner_helpers.h" |
#include "base/sha1.h" |
#include "base/stl_util.h" |
@@ -101,18 +102,6 @@ bool SetNonBlock(int fd) { |
return flags >= 0 && fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0; |
} |
-// Returns true on success. |
-bool IgnoreSigPipe() { |
- struct sigaction sa; |
- sa.sa_handler = SIG_IGN; |
- sa.sa_flags = 0; |
- if (sigemptyset(&sa.sa_mask) || sigaction(SIGPIPE, &sa, 0)) { |
- LOG(ERROR) << "WebSocketProxy: Failed to disable sigpipe"; |
- return false; |
- } |
- return true; |
-} |
- |
uint64 ReadNetworkInteger(uint8* buf, int num_bytes) { |
uint64 rv = 0; |
DCHECK_GE(num_bytes, 0); |
@@ -921,7 +910,7 @@ void Serv::Run() { |
if (evdns_init()) |
LOG(WARNING) << "WebSocketProxy: Failed to initialize evDNS"; |
- if (!IgnoreSigPipe()) { |
+ if (!base::IgnoreSigPipe()) { |
LOG(ERROR) << "WebSocketProxy: Failed to ignore SIGPIPE"; |
return; |
} |