| 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/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // list. | 95 // list. |
| 96 BrowserChildProcessList copy = g_child_process_list.Get(); | 96 BrowserChildProcessList copy = g_child_process_list.Get(); |
| 97 for (BrowserChildProcessList::iterator it = copy.begin(); | 97 for (BrowserChildProcessList::iterator it = copy.begin(); |
| 98 it != copy.end(); ++it) { | 98 it != copy.end(); ++it) { |
| 99 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl. | 99 delete (*it)->delegate(); // ~*HostDelegate deletes *HostImpl. |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 void BrowserChildProcessHostImpl::Launch( | 103 void BrowserChildProcessHostImpl::Launch( |
| 104 #if defined(OS_WIN) | 104 #if defined(OS_WIN) |
| 105 const FilePath& exposed_dir, | 105 const base::FilePath& exposed_dir, |
| 106 #elif defined(OS_POSIX) | 106 #elif defined(OS_POSIX) |
| 107 bool use_zygote, | 107 bool use_zygote, |
| 108 const base::EnvironmentVector& environ, | 108 const base::EnvironmentVector& environ, |
| 109 #endif | 109 #endif |
| 110 CommandLine* cmd_line) { | 110 CommandLine* cmd_line) { |
| 111 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 111 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 112 | 112 |
| 113 GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 113 GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
| 114 cmd_line, data_.id); | 114 cmd_line, data_.id); |
| 115 | 115 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 262 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
| 263 if (!child_process_->GetHandle()) { | 263 if (!child_process_->GetHandle()) { |
| 264 delete delegate_; // Will delete us | 264 delete delegate_; // Will delete us |
| 265 return; | 265 return; |
| 266 } | 266 } |
| 267 data_.handle = child_process_->GetHandle(); | 267 data_.handle = child_process_->GetHandle(); |
| 268 delegate_->OnProcessLaunched(); | 268 delegate_->OnProcessLaunched(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 } // namespace content | 271 } // namespace content |
| OLD | NEW |