OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/metrics/field_trial.h" | 6 #include "base/metrics/field_trial.h" |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/win/scoped_handle.h" | 8 #include "base/win/scoped_handle.h" |
9 #include "base/win/win_util.h" | 9 #include "base/win/win_util.h" |
10 #include "content/browser/child_process_launcher_helper.h" | 10 #include "content/browser/child_process_launcher_helper.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 const FileMappedForLaunch& files_to_register, | 45 const FileMappedForLaunch& files_to_register, |
46 base::LaunchOptions* options) { | 46 base::LaunchOptions* options) { |
47 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); | 47 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); |
48 } | 48 } |
49 | 49 |
50 ChildProcessLauncherHelper::Process | 50 ChildProcessLauncherHelper::Process |
51 ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( | 51 ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( |
52 const base::LaunchOptions& options, | 52 const base::LaunchOptions& options, |
53 std::unique_ptr<FileMappedForLaunch> files_to_register, | 53 std::unique_ptr<FileMappedForLaunch> files_to_register, |
54 bool* is_synchronous_launch, | 54 bool* is_synchronous_launch, |
55 int* launch_result) { | 55 int* launch_result, |
| 56 std::unique_ptr<mojo::edk::PendingProcessConnection>* pending_connection, |
| 57 mojo::edk::ScopedPlatformHandle* server_handle) { |
56 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); | 58 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); |
57 *is_synchronous_launch = true; | 59 *is_synchronous_launch = true; |
58 if (delegate_->ShouldLaunchElevated()) { | 60 if (delegate_->ShouldLaunchElevated()) { |
59 // When establishing a Mojo connection, the pipe path has already been added | 61 // When establishing a Mojo connection, the pipe path has already been added |
60 // to the command line. | 62 // to the command line. |
61 base::LaunchOptions win_options; | 63 base::LaunchOptions win_options; |
62 win_options.start_hidden = true; | 64 win_options.start_hidden = true; |
63 ChildProcessLauncherHelper::Process process; | 65 ChildProcessLauncherHelper::Process process; |
64 process.process = base::LaunchElevatedProcess(*command_line(), win_options); | 66 process.process = base::LaunchElevatedProcess(*command_line(), win_options); |
65 return process; | 67 return process; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // static | 112 // static |
111 void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( | 113 void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( |
112 base::Process process, bool background) { | 114 base::Process process, bool background) { |
113 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); | 115 DCHECK_CURRENTLY_ON(BrowserThread::PROCESS_LAUNCHER); |
114 if (process.CanBackgroundProcesses()) | 116 if (process.CanBackgroundProcesses()) |
115 process.SetProcessBackgrounded(background); | 117 process.SetProcessBackgrounded(background); |
116 } | 118 } |
117 | 119 |
118 } // namespace internal | 120 } // namespace internal |
119 } // namespace content | 121 } // namespace content |
OLD | NEW |