| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/browser_child_process_host_impl.h" | 5 #include "content/browser/browser_child_process_host_impl.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // list. | 125 // list. |
| 126 BrowserChildProcessList copy = g_child_process_list.Get(); | 126 BrowserChildProcessList copy = g_child_process_list.Get(); |
| 127 for (BrowserChildProcessList::iterator it = copy.begin(); | 127 for (BrowserChildProcessList::iterator it = copy.begin(); |
| 128 it != copy.end(); ++it) { | 128 it != copy.end(); ++it) { |
| 129 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl. | 129 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl. |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 void BrowserChildProcessHostImpl::Launch( | 133 void BrowserChildProcessHostImpl::Launch( |
| 134 SandboxedProcessLauncherDelegate* delegate, | 134 SandboxedProcessLauncherDelegate* delegate, |
| 135 CommandLine* cmd_line) { | 135 base::CommandLine* cmd_line) { |
| 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 137 | 137 |
| 138 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 138 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
| 139 cmd_line, data_.id); | 139 cmd_line, data_.id); |
| 140 | 140 |
| 141 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 141 const base::CommandLine& browser_command_line = |
| 142 *base::CommandLine::ForCurrentProcess(); |
| 142 static const char* kForwardSwitches[] = { | 143 static const char* kForwardSwitches[] = { |
| 143 switches::kDisableLogging, | 144 switches::kDisableLogging, |
| 144 switches::kEnableLogging, | 145 switches::kEnableLogging, |
| 145 switches::kIPCConnectionTimeout, | 146 switches::kIPCConnectionTimeout, |
| 146 switches::kLoggingLevel, | 147 switches::kLoggingLevel, |
| 147 switches::kTraceToConsole, | 148 switches::kTraceToConsole, |
| 148 switches::kV, | 149 switches::kV, |
| 149 switches::kVModule, | 150 switches::kVModule, |
| 150 }; | 151 }; |
| 151 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, | 152 cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches, |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 359 |
| 359 void BrowserChildProcessHostImpl::OnProcessExitedEarly( | 360 void BrowserChildProcessHostImpl::OnProcessExitedEarly( |
| 360 base::WaitableEvent* event) { | 361 base::WaitableEvent* event) { |
| 361 DeleteProcessWaitableEvent(event); | 362 DeleteProcessWaitableEvent(event); |
| 362 OnChildDisconnected(); | 363 OnChildDisconnected(); |
| 363 } | 364 } |
| 364 | 365 |
| 365 #endif | 366 #endif |
| 366 | 367 |
| 367 } // namespace content | 368 } // namespace content |
| OLD | NEW |