summaryrefslogtreecommitdiffstats
path: root/content/browser/child_process_launcher.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:00:39 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-30 18:00:39 +0000
commitb345c488dfae844a0794ead7d883ca3034f95531 (patch)
tree501d2ee3eed434f851b120af25f65afdccb9c65a /content/browser/child_process_launcher.cc
parent23d51ef236f607124c81d4244eec2131ee04f37b (diff)
downloadchromium_src-b345c488dfae844a0794ead7d883ca3034f95531.zip
chromium_src-b345c488dfae844a0794ead7d883ca3034f95531.tar.gz
chromium_src-b345c488dfae844a0794ead7d883ca3034f95531.tar.bz2
Move AlterEnvironment to base/environment.h, implement on Windows. This re-implements the Posix version to be more like the Windows version and to share some parsing code. The new version will be somewhat slower due to some extra mallocs, but is shorter and more clear. I didn't want to implement a super optimized version on Windows, and the alternative would be to keep the new Windows version and the old Posix version in parallel which seemed less desirable.
This changes the input from a vector to a map and just adds the map on the LaunchOptions rather than requiring the caller to set a pointer. This cleans up the callsites somewhat. BUG= R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/22750002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220608 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/child_process_launcher.cc')
-rw-r--r--content/browser/child_process_launcher.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index b5bb3f4..a7927b3 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -74,7 +74,7 @@ class ChildProcessLauncher::Context
int ipcfd,
#elif defined(OS_POSIX)
bool use_zygote,
- const base::EnvironmentVector& environ,
+ const base::EnvironmentMap& environ,
int ipcfd,
#endif
CommandLine* cmd_line,
@@ -186,7 +186,7 @@ class ChildProcessLauncher::Context
int ipcfd,
#elif defined(OS_POSIX)
bool use_zygote,
- const base::EnvironmentVector& env,
+ const base::EnvironmentMap& env,
int ipcfd,
#endif
CommandLine* cmd_line) {
@@ -262,7 +262,7 @@ class ChildProcessLauncher::Context
// Actually launch the app.
base::LaunchOptions options;
- options.environ = &env;
+ options.environ = env;
options.fds_to_remap = &fds_to_map;
#if defined(OS_MACOSX)
@@ -414,7 +414,7 @@ ChildProcessLauncher::ChildProcessLauncher(
SandboxedProcessLauncherDelegate* delegate,
#elif defined(OS_POSIX)
bool use_zygote,
- const base::EnvironmentVector& environ,
+ const base::EnvironmentMap& environ,
int ipcfd,
#endif
CommandLine* cmd_line,