[go: nahoru, domu]

Set GTK_PATH to CHROMIUM_SAVED_GTK_PATH before launching xdg-open.

Wrappers that launch Chromium will need to set CHROMIUM_SAVED_GTK_PATH before
modifying GTK_PATH. This can be done later in separate CLs.

BUG=15565
TEST=see bug

Review URL: http://codereview.chromium.org/159112

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21168 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/process_util.h b/base/process_util.h
index f3e47fd..31d8de7 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -20,6 +20,7 @@
 #endif
 
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "base/command_line.h"
@@ -141,7 +142,16 @@
 bool LaunchApp(const std::vector<std::string>& argv,
                const file_handle_mapping_vector& fds_to_remap,
                bool wait, ProcessHandle* process_handle);
-#endif
+#if defined(OS_LINUX)
+// Similar to above, but also (un)set environment variables in child process
+// through |environ|.
+typedef std::vector<std::pair<const char*, const char*> > environment_vector;
+bool LaunchApp(const std::vector<std::string>& argv,
+               const environment_vector& environ,
+               const file_handle_mapping_vector& fds_to_remap,
+               bool wait, ProcessHandle* process_handle);
+#endif  // defined(OS_LINUX)
+#endif  // defined(OS_POSIX)
 
 // Executes the application specified by cl. This function delegates to one
 // of the above two platform-specific functions.