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

Unified Diff: chrome/browser/zygote_host_linux.cc

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 5 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
« no previous file with comments | « chrome/browser/worker_host/worker_process_host.cc ('k') | chrome/common/nacl_cmd_line.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/zygote_host_linux.cc
diff --git a/chrome/browser/zygote_host_linux.cc b/chrome/browser/zygote_host_linux.cc
index 49c93c2726992f779d22fa239e333f8b028cf749..983e2cea9f60731573d1ff13aff0f63399951ed9 100644
--- a/chrome/browser/zygote_host_linux.cc
+++ b/chrome/browser/zygote_host_linux.cc
@@ -96,16 +96,9 @@ void ZygoteHost::Init(const std::string& sandbox_cmd) {
#else
switches::kEnableSeccompSandbox,
#endif
- NULL
};
- for (const char** sw = kForwardSwitches; *sw; sw++) {
- if (browser_command_line.HasSwitch(*sw)) {
- // Always append with value for those switches which need it; it does no
- // harm for those which don't.
- cmd_line.AppendSwitchWithValue(*sw,
- browser_command_line.GetSwitchValueASCII(*sw));
- }
- }
+ cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches,
+ arraysize(kForwardSwitches));
sandbox_binary_ = sandbox_cmd.c_str();
struct stat st;
« no previous file with comments | « chrome/browser/worker_host/worker_process_host.cc ('k') | chrome/common/nacl_cmd_line.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698