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

Side by Side Diff: content/browser/child_process_launcher.cc

Issue 8113035: Remove RenderProcessHost::is_extension_process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/app/content_main.cc ('k') | content/browser/content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/child_process_launcher.h" 5 #include "content/browser/child_process_launcher.h"
6 6
7 #include <utility> // For std::pair. 7 #include <utility> // For std::pair.
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 #elif defined(OS_POSIX) 122 #elif defined(OS_POSIX)
123 // We need to close the client end of the IPC channel 123 // We need to close the client end of the IPC channel
124 // to reliably detect child termination. 124 // to reliably detect child termination.
125 file_util::ScopedFD ipcfd_closer(&ipcfd); 125 file_util::ScopedFD ipcfd_closer(&ipcfd);
126 126
127 #if defined(OS_POSIX) && !defined(OS_MACOSX) 127 #if defined(OS_POSIX) && !defined(OS_MACOSX)
128 // On Linux, we need to add some extra file descriptors for crash handling. 128 // On Linux, we need to add some extra file descriptors for crash handling.
129 std::string process_type = 129 std::string process_type =
130 cmd_line->GetSwitchValueASCII(switches::kProcessType); 130 cmd_line->GetSwitchValueASCII(switches::kProcessType);
131 int crash_signal_fd = 131 int crash_signal_fd =
132 content::GetContentClient()->browser()->GetCrashSignalFD(process_type); 132 content::GetContentClient()->browser()->GetCrashSignalFD(*cmd_line);
133 if (use_zygote) { 133 if (use_zygote) {
134 base::GlobalDescriptors::Mapping mapping; 134 base::GlobalDescriptors::Mapping mapping;
135 mapping.push_back(std::pair<uint32_t, int>(kPrimaryIPCChannel, ipcfd)); 135 mapping.push_back(std::pair<uint32_t, int>(kPrimaryIPCChannel, ipcfd));
136 if (crash_signal_fd >= 0) { 136 if (crash_signal_fd >= 0) {
137 mapping.push_back(std::pair<uint32_t, int>(kCrashDumpSignal, 137 mapping.push_back(std::pair<uint32_t, int>(kCrashDumpSignal,
138 crash_signal_fd)); 138 crash_signal_fd));
139 } 139 }
140 handle = ZygoteHost::GetInstance()->ForkRequest(cmd_line->argv(), 140 handle = ZygoteHost::GetInstance()->ForkRequest(cmd_line->argv(),
141 mapping, 141 mapping,
142 process_type); 142 process_type);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 NewRunnableFunction( 373 NewRunnableFunction(
374 &ChildProcessLauncher::Context::SetProcessBackgrounded, 374 &ChildProcessLauncher::Context::SetProcessBackgrounded,
375 GetHandle(), background)); 375 GetHandle(), background));
376 } 376 }
377 377
378 void ChildProcessLauncher::SetTerminateChildOnShutdown( 378 void ChildProcessLauncher::SetTerminateChildOnShutdown(
379 bool terminate_on_shutdown) { 379 bool terminate_on_shutdown) {
380 if (context_) 380 if (context_)
381 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); 381 context_->set_terminate_child_on_shutdown(terminate_on_shutdown);
382 } 382 }
OLDNEW
« no previous file with comments | « content/app/content_main.cc ('k') | content/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698