summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base.gyp6
-rw-r--r--base/base.gypi2
-rw-r--r--base/posix/file_descriptor_shuffle.cc (renamed from base/file_descriptor_shuffle.cc)2
-rw-r--r--base/posix/file_descriptor_shuffle.h (renamed from base/file_descriptor_shuffle.h)6
-rw-r--r--base/posix/file_descriptor_shuffle_unittest.cc (renamed from base/file_descriptor_shuffle_unittest.cc)2
-rw-r--r--base/process_util.h5
6 files changed, 13 insertions, 10 deletions
diff --git a/base/base.gyp b/base/base.gyp
index 14460d4..0497c14 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -217,8 +217,6 @@
'event_recorder.h',
'event_recorder_stubs.cc',
'event_recorder_win.cc',
- 'file_descriptor_shuffle.cc',
- 'file_descriptor_shuffle.h',
'linux_util.cc',
'linux_util.h',
'md5.cc',
@@ -238,6 +236,8 @@
'message_pump_mac.mm',
'metrics/field_trial.cc',
'metrics/field_trial.h',
+ 'posix/file_descriptor_shuffle.cc',
+ 'posix/file_descriptor_shuffle.h',
'sync_socket.h',
'sync_socket_win.cc',
'sync_socket_posix.cc',
@@ -427,7 +427,6 @@
'debug/trace_event_unittest.h',
'debug/trace_event_win_unittest.cc',
'environment_unittest.cc',
- 'file_descriptor_shuffle_unittest.cc',
'file_path_unittest.cc',
'file_util_proxy_unittest.cc',
'file_util_unittest.cc',
@@ -493,6 +492,7 @@
'path_service_unittest.cc',
'pickle_unittest.cc',
'platform_file_unittest.cc',
+ 'posix/file_descriptor_shuffle_unittest.cc',
'pr_time_unittest.cc',
'process_util_unittest.cc',
'process_util_unittest_ios.cc',
diff --git a/base/base.gypi b/base/base.gypi
index 0798fa8..3517653 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -670,10 +670,10 @@
],
'sources!': [
'event_recorder_stubs.cc',
- 'file_descriptor_shuffle.cc',
'files/file_path_watcher_kqueue.cc',
'files/file_path_watcher_stub.cc',
'message_pump_libevent.cc',
+ 'posix/file_descriptor_shuffle.cc',
# Not using sha1_win.cc because it may have caused a
# regression to page cycler moz.
'sha1_win.cc',
diff --git a/base/file_descriptor_shuffle.cc b/base/posix/file_descriptor_shuffle.cc
index 7ad9787..0dde958 100644
--- a/base/file_descriptor_shuffle.cc
+++ b/base/posix/file_descriptor_shuffle.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 "base/file_descriptor_shuffle.h"
+#include "base/posix/file_descriptor_shuffle.h"
#include <unistd.h>
#include <stddef.h>
diff --git a/base/file_descriptor_shuffle.h b/base/posix/file_descriptor_shuffle.h
index 5740bfa..6888c3e 100644
--- a/base/file_descriptor_shuffle.h
+++ b/base/posix/file_descriptor_shuffle.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_FILE_DESCRIPTOR_SHUFFLE_H_
-#define BASE_FILE_DESCRIPTOR_SHUFFLE_H_
+#ifndef BASE_POSIX_FILE_DESCRIPTOR_SHUFFLE_H_
+#define BASE_POSIX_FILE_DESCRIPTOR_SHUFFLE_H_
// This code exists to perform the shuffling of file descriptors which is
// commonly needed when forking subprocesses. The naive approve is very simple,
@@ -84,4 +84,4 @@ static inline bool ShuffleFileDescriptors(InjectiveMultimap* map) {
} // namespace base
-#endif // BASE_FILE_DESCRIPTOR_SHUFFLE_H_
+#endif // BASE_POSIX_FILE_DESCRIPTOR_SHUFFLE_H_
diff --git a/base/file_descriptor_shuffle_unittest.cc b/base/posix/file_descriptor_shuffle_unittest.cc
index 943df55..9e1b2500 100644
--- a/base/file_descriptor_shuffle_unittest.cc
+++ b/base/posix/file_descriptor_shuffle_unittest.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 "base/file_descriptor_shuffle.h"
+#include "base/posix/file_descriptor_shuffle.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/base/process_util.h b/base/process_util.h
index b12297e..2805e42 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -37,10 +37,13 @@ typedef struct _malloc_zone_t malloc_zone_t;
#include <vector>
#include "base/base_export.h"
-#include "base/file_descriptor_shuffle.h"
#include "base/file_path.h"
#include "base/process.h"
+#if defined(OS_POSIX)
+#include "base/posix/file_descriptor_shuffle.h"
+#endif
+
class CommandLine;
namespace base {