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

Unified Diff: chrome/common/nacl_cmd_line.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/zygote_host_linux.cc ('k') | chrome/renderer/renderer_main_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/nacl_cmd_line.cc
diff --git a/chrome/common/nacl_cmd_line.cc b/chrome/common/nacl_cmd_line.cc
index a54f1960a17e0dc05386458ed71cbe3888a268b2..82c2634da5ed145330bf6df31a09ccdc5cb07997 100644
--- a/chrome/common/nacl_cmd_line.cc
+++ b/chrome/common/nacl_cmd_line.cc
@@ -16,7 +16,7 @@ namespace nacl {
// Propagate the following switches to the NaCl loader command line (along
// with any associated values) if present in the browser command line.
// TODO(gregoryd): check which flags of those below can be supported.
- static const char* const switch_names[] = {
+ static const char* const kSwitchNames[] = {
switches::kNoSandbox,
switches::kTestNaClSandbox,
switches::kDisableBreakpad,
@@ -28,13 +28,7 @@ namespace nacl {
switches::kSilentDumpOnDCHECK,
switches::kMemoryProfiling,
};
-
- for (size_t i = 0; i < arraysize(switch_names); ++i) {
- if (browser_command_line.HasSwitch(switch_names[i])) {
- cmd_line->AppendSwitchWithValue(
- switch_names[i],
- browser_command_line.GetSwitchValueASCII(switch_names[i]));
- }
- }
+ cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames,
+ arraysize(kSwitchNames));
}
}
« no previous file with comments | « chrome/browser/zygote_host_linux.cc ('k') | chrome/renderer/renderer_main_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698