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

Unified Diff: content/browser/browser_child_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 side-by-side diff with in-line comments
Download patch
Index: content/browser/browser_child_process_host_impl.cc
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 8e6bde3b0abb07daf0e2c09253c36dfce86b38e8..26ab2f6ee7ceeeba04ff6d1e43472c07e7d6a949 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -128,6 +128,34 @@ void BrowserChildProcessHostImpl::TerminateAll() {
}
}
+#if defined(OS_WIN)
+void BrowserChildProcessHostImpl::LaunchElevated(CommandLine* cmd_line) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+
+ GetContentClient()->browser()->AppendExtraCommandLineSwitches(
+ cmd_line, data_.id);
+
+ const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+ static const char* kForwardSwitches[] = {
+ switches::kDisableLogging,
+ switches::kEnableDCHECK,
+ switches::kEnableLogging,
+ switches::kLoggingLevel,
+ switches::kTraceToConsole,
+ switches::kV,
+ switches::kVModule,
+ switches::kEnableHighResolutionTime,
+ };
+ cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches,
+ arraysize(kForwardSwitches));
+
+ child_process_.reset(ChildProcessLauncher::CreateElevated(
+ cmd_line,
+ data_.id,
+ this));
+}
+#endif
+
void BrowserChildProcessHostImpl::Launch(
#if defined(OS_WIN)
SandboxedProcessLauncherDelegate* delegate,
@@ -160,7 +188,7 @@ void BrowserChildProcessHostImpl::Launch(
cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches,
arraysize(kForwardSwitches));
- child_process_.reset(new ChildProcessLauncher(
+ child_process_.reset(ChildProcessLauncher::Create(
#if defined(OS_WIN)
delegate,
#elif defined(OS_POSIX)

Powered by Google App Engine
This is Rietveld 408576698