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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 98603007: Launches a privileged utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleans up edge cases and error handling. Fixes nits. Created 6 years, 11 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
OLDNEW
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 // first so the process type argument will appear first. 499 // first so the process type argument will appear first.
500 CommandLine* cmd_line = new CommandLine(renderer_path); 500 CommandLine* cmd_line = new CommandLine(renderer_path);
501 if (!renderer_prefix.empty()) 501 if (!renderer_prefix.empty())
502 cmd_line->PrependWrapper(renderer_prefix); 502 cmd_line->PrependWrapper(renderer_prefix);
503 AppendRendererCommandLine(cmd_line); 503 AppendRendererCommandLine(cmd_line);
504 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 504 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
505 505
506 // Spawn the child process asynchronously to avoid blocking the UI thread. 506 // Spawn the child process asynchronously to avoid blocking the UI thread.
507 // As long as there's no renderer prefix, we can use the zygote process 507 // As long as there's no renderer prefix, we can use the zygote process
508 // at this stage. 508 // at this stage.
509 child_process_launcher_.reset(new ChildProcessLauncher( 509 child_process_launcher_.reset(ChildProcessLauncher::Create(
510 #if defined(OS_WIN) 510 #if defined(OS_WIN)
511 new RendererSandboxedProcessLauncherDelegate, 511 new RendererSandboxedProcessLauncherDelegate,
512 #elif defined(OS_POSIX) 512 #elif defined(OS_POSIX)
513 renderer_prefix.empty(), 513 renderer_prefix.empty(),
514 base::EnvironmentMap(), 514 base::EnvironmentMap(),
515 channel_->TakeClientFileDescriptor(), 515 channel_->TakeClientFileDescriptor(),
516 #endif 516 #endif
517 cmd_line, 517 cmd_line,
518 GetID(), 518 GetID(),
519 this)); 519 this));
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 // Skip widgets in other processes. 1810 // Skip widgets in other processes.
1811 if (widget->GetProcess()->GetID() != GetID()) 1811 if (widget->GetProcess()->GetID() != GetID())
1812 continue; 1812 continue;
1813 1813
1814 RenderViewHost* rvh = RenderViewHost::From(widget); 1814 RenderViewHost* rvh = RenderViewHost::From(widget);
1815 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); 1815 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences());
1816 } 1816 }
1817 } 1817 }
1818 1818
1819 } // namespace content 1819 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698