summaryrefslogtreecommitdiffstats
path: root/chrome/browser/service
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-28 13:01:52 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-28 13:01:52 +0000
commit9190cf030209241d692a0565187c5d1e7b2f254b (patch)
treee161f030b01e2bb45d32c7a3793179308739659e /chrome/browser/service
parent6c1d947968dd660991dde16d3a1e9995df7ae957 (diff)
downloadchromium_src-9190cf030209241d692a0565187c5d1e7b2f254b.zip
chromium_src-9190cf030209241d692a0565187c5d1e7b2f254b.tar.gz
chromium_src-9190cf030209241d692a0565187c5d1e7b2f254b.tar.bz2
Copy --no-service-autorun and --cloud-print-setup-proxy to service chrome process.
BUG=224547 TBR=gene Review URL: https://chromiumcodereview.appspot.com/13151002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/service')
-rw-r--r--chrome/browser/service/service_process_control.cc43
1 files changed, 14 insertions, 29 deletions
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index 3f7b384..c7d9e2b 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -125,35 +125,20 @@ void ServiceProcessControl::Launch(const base::Closure& success_task,
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kServiceProcess);
- const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
- base::FilePath user_data_dir =
- browser_command_line.GetSwitchValuePath(switches::kUserDataDir);
- if (!user_data_dir.empty())
- cmd_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
-
- std::string logging_level = browser_command_line.GetSwitchValueASCII(
- switches::kLoggingLevel);
- if (!logging_level.empty())
- cmd_line->AppendSwitchASCII(switches::kLoggingLevel, logging_level);
-
- std::string v_level = browser_command_line.GetSwitchValueASCII(
- switches::kV);
- if (!v_level.empty())
- cmd_line->AppendSwitchASCII(switches::kV, v_level);
-
- std::string v_modules = browser_command_line.GetSwitchValueASCII(
- switches::kVModule);
- if (!v_modules.empty())
- cmd_line->AppendSwitchASCII(switches::kVModule, v_modules);
-
- if (browser_command_line.HasSwitch(switches::kWaitForDebuggerChildren))
- cmd_line->AppendSwitch(switches::kWaitForDebugger);
-
- if (browser_command_line.HasSwitch(switches::kEnableLogging))
- cmd_line->AppendSwitch(switches::kEnableLogging);
-
- std::string locale = g_browser_process->GetApplicationLocale();
- cmd_line->AppendSwitchASCII(switches::kLang, locale);
+ static const char* const kSwitchesToCopy[] = {
+ switches::kCloudPrintSetupProxy,
+ switches::kEnableLogging,
+ switches::kLang,
+ switches::kLoggingLevel,
+ switches::kNoServiceAutorun,
+ switches::kUserDataDir,
+ switches::kV,
+ switches::kVModule,
+ switches::kWaitForDebugger,
+ };
+ cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(),
+ kSwitchesToCopy,
+ arraysize(kSwitchesToCopy));
// And then start the process asynchronously.
launcher_ = new Launcher(this, cmd_line);