| Index: base/process/launch.h
|
| diff --git a/base/process/launch.h b/base/process/launch.h
|
| index 56f27a8210989ec599359f8fa4722f985099b663..06bdd91bf663b81c7f462e21e64e52f569e7fdef 100644
|
| --- a/base/process/launch.h
|
| +++ b/base/process/launch.h
|
| @@ -20,17 +20,12 @@
|
|
|
| #if defined(OS_POSIX)
|
| #include "base/posix/file_descriptor_shuffle.h"
|
| -#elif defined(OS_WIN)
|
| -#include <windows.h>
|
| #endif
|
|
|
| namespace base {
|
|
|
| class CommandLine;
|
|
|
| -#if defined(OS_WIN)
|
| -typedef std::vector<HANDLE> HandlesToInheritVector;
|
| -#endif
|
| // TODO(viettrungluu): Only define this on POSIX?
|
| typedef std::vector<std::pair<int, int> > FileHandleMappingVector;
|
|
|
| @@ -61,51 +56,6 @@ struct BASE_EXPORT LaunchOptions {
|
| // If true, wait for the process to complete.
|
| bool wait;
|
|
|
| -#if defined(OS_WIN)
|
| - bool start_hidden;
|
| -
|
| - // If non-null, inherit exactly the list of handles in this vector (these
|
| - // handles must be inheritable). This is only supported on Vista and higher.
|
| - HandlesToInheritVector* handles_to_inherit;
|
| -
|
| - // If true, the new process inherits handles from the parent. In production
|
| - // code this flag should be used only when running short-lived, trusted
|
| - // binaries, because open handles from other libraries and subsystems will
|
| - // leak to the child process, causing errors such as open socket hangs.
|
| - // Note: If |handles_to_inherit| is non-null, this flag is ignored and only
|
| - // those handles will be inherited (on Vista and higher).
|
| - bool inherit_handles;
|
| -
|
| - // If non-null, runs as if the user represented by the token had launched it.
|
| - // Whether the application is visible on the interactive desktop depends on
|
| - // the token belonging to an interactive logon session.
|
| - //
|
| - // To avoid hard to diagnose problems, when specified this loads the
|
| - // environment variables associated with the user and if this operation fails
|
| - // the entire call fails as well.
|
| - UserTokenHandle as_user;
|
| -
|
| - // If true, use an empty string for the desktop name.
|
| - bool empty_desktop_name;
|
| -
|
| - // If non-null, launches the application in that job object. The process will
|
| - // be terminated immediately and LaunchProcess() will fail if assignment to
|
| - // the job object fails.
|
| - HANDLE job_handle;
|
| -
|
| - // Handles for the redirection of stdin, stdout and stderr. The handles must
|
| - // be inheritable. Caller should either set all three of them or none (i.e.
|
| - // there is no way to redirect stderr without redirecting stdin). The
|
| - // |inherit_handles| flag must be set to true when redirecting stdio stream.
|
| - HANDLE stdin_handle;
|
| - HANDLE stdout_handle;
|
| - HANDLE stderr_handle;
|
| -
|
| - // If set to true, ensures that the child process is launched with the
|
| - // CREATE_BREAKAWAY_FROM_JOB flag which allows it to breakout of the parent
|
| - // job if any.
|
| - bool force_breakaway_from_job_;
|
| -#else
|
| // Set/unset environment variables. These are applied on top of the parent
|
| // process environment. Empty (the default) means to inherit the same
|
| // environment. See AlterEnvironment().
|
| @@ -174,7 +124,6 @@ struct BASE_EXPORT LaunchOptions {
|
| std::string replacement_bootstrap_name;
|
| #endif
|
|
|
| -#endif // !defined(OS_WIN)
|
| };
|
|
|
| // Launch a process via the command line |cmdline|.
|
| @@ -193,29 +142,7 @@ struct BASE_EXPORT LaunchOptions {
|
| BASE_EXPORT Process LaunchProcess(const CommandLine& cmdline,
|
| const LaunchOptions& options);
|
|
|
| -#if defined(OS_WIN)
|
| -// Windows-specific LaunchProcess that takes the command line as a
|
| -// string. Useful for situations where you need to control the
|
| -// command line arguments directly, but prefer the CommandLine version
|
| -// if launching Chrome itself.
|
| -//
|
| -// The first command line argument should be the path to the process,
|
| -// and don't forget to quote it.
|
| -//
|
| -// Example (including literal quotes)
|
| -// cmdline = "c:\windows\explorer.exe" -foo "c:\bar\"
|
| -BASE_EXPORT Process LaunchProcess(const string16& cmdline,
|
| - const LaunchOptions& options);
|
| -
|
| -// Launches a process with elevated privileges. This does not behave exactly
|
| -// like LaunchProcess as it uses ShellExecuteEx instead of CreateProcess to
|
| -// create the process. This means the process will have elevated privileges
|
| -// and thus some common operations like OpenProcess will fail. Currently the
|
| -// only supported LaunchOptions are |start_hidden| and |wait|.
|
| -BASE_EXPORT Process LaunchElevatedProcess(const CommandLine& cmdline,
|
| - const LaunchOptions& options);
|
| -
|
| -#elif defined(OS_POSIX)
|
| +#if defined(OS_POSIX)
|
| // 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
|
| @@ -229,29 +156,12 @@ BASE_EXPORT Process LaunchProcess(const std::vector<std::string>& argv,
|
| BASE_EXPORT void CloseSuperfluousFds(const InjectiveMultimap& saved_map);
|
| #endif // defined(OS_POSIX)
|
|
|
| -#if defined(OS_WIN)
|
| -// Set |job_object|'s JOBOBJECT_EXTENDED_LIMIT_INFORMATION
|
| -// BasicLimitInformation.LimitFlags to |limit_flags|.
|
| -BASE_EXPORT bool SetJobObjectLimitFlags(HANDLE job_object, DWORD limit_flags);
|
| -
|
| -// Output multi-process printf, cout, cerr, etc to the cmd.exe console that ran
|
| -// chrome. This is not thread-safe: only call from main thread.
|
| -BASE_EXPORT void RouteStdioToConsole();
|
| -#endif // defined(OS_WIN)
|
| -
|
| // Executes the application specified by |cl| and wait for it to exit. Stores
|
| // the output (stdout) in |output|. Redirects stderr to /dev/null. Returns true
|
| // on success (application launched and exited cleanly, with exit code
|
| // indicating success).
|
| BASE_EXPORT bool GetAppOutput(const CommandLine& cl, std::string* output);
|
|
|
| -#if defined(OS_WIN)
|
| -// A Windows-specific version of GetAppOutput that takes a command line string
|
| -// instead of a CommandLine object. Useful for situations where you need to
|
| -// control the command line arguments directly.
|
| -BASE_EXPORT bool GetAppOutput(const StringPiece16& cl, std::string* output);
|
| -#endif
|
| -
|
| #if defined(OS_POSIX)
|
| // A POSIX-specific version of GetAppOutput that takes an argv array
|
| // instead of a CommandLine. Useful for situations where you need to
|
|
|