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

Unified Diff: base/process/launch.h

Issue 2692273008: Hacky slashy (Closed)
Patch Set: wip Created 3 years, 10 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
Index: base/process/launch.h
diff --git a/base/process/launch.h b/base/process/launch.h
index be8f6e73b9fe659e2e5dd5cd8cf482f990f82d83..ebb2bfd2c2490e550ccd1c190a0a01a0914c6cc2 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -21,7 +21,7 @@
#include "base/strings/string_piece.h"
#include "build/build_config.h"
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) || defined(OS_FUCHSIA)
#include "base/posix/file_descriptor_shuffle.h"
#elif defined(OS_WIN)
#include <windows.h>
@@ -40,7 +40,7 @@ typedef std::vector<std::pair<int, int> > FileHandleMappingVector;
// Options for launching a subprocess that are passed to LaunchProcess().
// The default constructor constructs the object with default options.
struct BASE_EXPORT LaunchOptions {
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) || defined(OS_FUCHSIA)
// Delegate to be run in between fork and exec in the subprocess (see
// pre_exec_delegate below)
class BASE_EXPORT PreExecDelegate {
@@ -56,7 +56,7 @@ struct BASE_EXPORT LaunchOptions {
private:
DISALLOW_COPY_AND_ASSIGN(PreExecDelegate);
};
-#endif // defined(OS_POSIX)
+#endif // defined(OS_POSIX) || defined(OS_FUCHSIA)
LaunchOptions();
LaunchOptions(const LaunchOptions&);
@@ -153,7 +153,7 @@ struct BASE_EXPORT LaunchOptions {
bool kill_on_parent_death = false;
#endif // defined(OS_LINUX)
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) || defined(OS_FUCHSIA)
// If not empty, launch the specified executable instead of
// cmdline.GetProgram(). This is useful when it is necessary to pass a custom
// argv[0].
@@ -166,7 +166,7 @@ struct BASE_EXPORT LaunchOptions {
// code running in this delegate essentially needs to be async-signal safe
// (see man 7 signal for a list of allowed functions).
PreExecDelegate* pre_exec_delegate = nullptr;
-#endif // defined(OS_POSIX)
+#endif // defined(OS_POSIX) || defined(OS_FUCHSIA)
#if defined(OS_CHROMEOS)
// If non-negative, the specified file descriptor will be set as the launched
@@ -214,7 +214,7 @@ BASE_EXPORT Process LaunchProcess(const string16& cmdline,
BASE_EXPORT Process LaunchElevatedProcess(const CommandLine& cmdline,
const LaunchOptions& options);
-#elif defined(OS_POSIX)
+#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
// A POSIX-specific version of LaunchProcess that takes an argv array
// instead of a CommandLine. Useful for situations where you need to
// control the command line arguments directly, but prefer the
@@ -226,7 +226,7 @@ BASE_EXPORT Process LaunchProcess(const std::vector<std::string>& argv,
// given multimap. Only call this function in a child process where you know
// that there aren't any other threads.
BASE_EXPORT void CloseSuperfluousFds(const InjectiveMultimap& saved_map);
-#endif // defined(OS_POSIX)
+#endif // defined(OS_POSIX) || defined(OS_FUCHSIA)
#if defined(OS_WIN)
// Set |job_object|'s JOBOBJECT_EXTENDED_LIMIT_INFORMATION
@@ -255,7 +255,7 @@ BASE_EXPORT bool GetAppOutputAndError(const CommandLine& cl,
BASE_EXPORT bool GetAppOutput(const StringPiece16& cl, std::string* output);
#endif
-#if defined(OS_POSIX)
+#if defined(OS_POSIX) || defined(OS_FUCHSIA)
// A POSIX-specific version of GetAppOutput that takes an argv array
// instead of a CommandLine. Useful for situations where you need to
// control the command line arguments directly.
@@ -268,7 +268,7 @@ BASE_EXPORT bool GetAppOutput(const std::vector<std::string>& argv,
// |*exit_code|.
BASE_EXPORT bool GetAppOutputWithExitCode(const CommandLine& cl,
std::string* output, int* exit_code);
-#endif // defined(OS_POSIX)
+#endif // defined(OS_POSIX) || defined(OS_FUCHSIA)
// If supported on the platform, and the user has sufficent rights, increase
// the current process's scheduling priority to a high priority.

Powered by Google App Engine
This is Rietveld 408576698