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

Unified Diff: content/browser/child_process_launcher.cc

Issue 11189068: Changing minidump process generation to be in-process on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/child_process_launcher.cc
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 0bbc03536eb4831cbacc36d2bc3dbe7f75b0ddd8..bcbb5bd0a55031cba2e26fdac15e245ee4842db0 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -75,6 +75,7 @@ class ChildProcessLauncher::Context
int ipcfd,
#endif
CommandLine* cmd_line,
+ int process_host_id,
Client* client) {
client_ = client;
@@ -92,6 +93,7 @@ class ChildProcessLauncher::Context
&Context::LaunchInternal,
make_scoped_refptr(this),
client_thread_id_,
+ process_host_id,
#if defined(OS_WIN)
exposed_dir,
#elif defined(OS_ANDROID)
@@ -148,6 +150,7 @@ class ChildProcessLauncher::Context
// |this_object| is NOT thread safe. Only use it to post a task back.
scoped_refptr<Context> this_object,
BrowserThread::ID client_thread_id,
+ int process_host_id,
#if defined(OS_WIN)
const FilePath& exposed_dir,
#elif defined(OS_ANDROID)
@@ -172,7 +175,8 @@ class ChildProcessLauncher::Context
base::FileDescriptor(ipcfd, false)));
content::GetContentClient()->browser()->
- GetAdditionalMappedFilesForChildProcess(*cmd_line, &files_to_register);
+ GetAdditionalMappedFilesForChildProcess(*cmd_line, process_host_id,
+ &files_to_register);
content::StartSandboxedProcess(cmd_line->argv(), files_to_register,
base::Bind(&ChildProcessLauncher::Context::OnSandboxedProcessStarted,
@@ -193,7 +197,8 @@ class ChildProcessLauncher::Context
#if !defined(OS_MACOSX)
content::GetContentClient()->browser()->
- GetAdditionalMappedFilesForChildProcess(*cmd_line, &files_to_register);
+ GetAdditionalMappedFilesForChildProcess(*cmd_line, process_host_id,
+ &files_to_register);
if (use_zygote) {
handle = ZygoteHostImpl::GetInstance()->ForkRequest(cmd_line->argv(),
files_to_register,
@@ -204,12 +209,11 @@ class ChildProcessLauncher::Context
{
// Convert FD mapping to FileHandleMappingVector
base::FileHandleMappingVector fds_to_map;
- for (std::vector<content::FileDescriptorInfo>::const_iterator
- i = files_to_register.begin(); i != files_to_register.end(); ++i) {
- const content::FileDescriptorInfo& fd_info = *i;
+ for (size_t i = 0; i < files_to_register.size(); ++i) {
fds_to_map.push_back(std::make_pair(
- fd_info.fd.fd,
- fd_info.id + base::GlobalDescriptors::kBaseDescriptor));
+ files_to_register[i].fd.fd,
+ files_to_register[i].id +
+ base::GlobalDescriptors::kBaseDescriptor));
}
#if !defined(OS_MACOSX)
@@ -374,6 +378,7 @@ ChildProcessLauncher::ChildProcessLauncher(
const FilePath& exposed_dir,
#elif defined(OS_POSIX)
bool use_zygote,
+ int process_host_id,
const base::EnvironmentVector& environ,
int ipcfd,
#endif
@@ -391,6 +396,7 @@ ChildProcessLauncher::ChildProcessLauncher(
ipcfd,
#endif
cmd_line,
+ process_host_id,
client);
}

Powered by Google App Engine
This is Rietveld 408576698