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

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

Issue 2706933003: webapk: Avoid overwriting default CreationParams
Patch Set: rebase 461342 Created 3 years, 8 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 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 "content/browser/child_process_launcher_helper.h" 5 #include "content/browser/child_process_launcher_helper.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "content/browser/child_process_launcher.h" 8 #include "content/browser/child_process_launcher.h"
9 #include "content/public/common/content_switches.h" 9 #include "content/public/common/content_switches.h"
10 #include "content/public/common/sandboxed_process_launcher_delegate.h" 10 #include "content/public/common/sandboxed_process_launcher_delegate.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #endif 48 #endif
49 return *this; 49 return *this;
50 } 50 }
51 51
52 ChildProcessLauncherHelper::ChildProcessLauncherHelper( 52 ChildProcessLauncherHelper::ChildProcessLauncherHelper(
53 int child_process_id, 53 int child_process_id,
54 BrowserThread::ID client_thread_id, 54 BrowserThread::ID client_thread_id,
55 std::unique_ptr<base::CommandLine> command_line, 55 std::unique_ptr<base::CommandLine> command_line,
56 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate, 56 std::unique_ptr<SandboxedProcessLauncherDelegate> delegate,
57 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher, 57 const base::WeakPtr<ChildProcessLauncher>& child_process_launcher,
58 bool terminate_on_shutdown) 58 bool terminate_on_shutdown,
59 int param_id)
59 : child_process_id_(child_process_id), 60 : child_process_id_(child_process_id),
60 client_thread_id_(client_thread_id), 61 client_thread_id_(client_thread_id),
62 param_id_(param_id),
61 command_line_(std::move(command_line)), 63 command_line_(std::move(command_line)),
62 delegate_(std::move(delegate)), 64 delegate_(std::move(delegate)),
63 child_process_launcher_(child_process_launcher), 65 child_process_launcher_(child_process_launcher),
64 terminate_on_shutdown_(terminate_on_shutdown) { 66 terminate_on_shutdown_(terminate_on_shutdown) {}
65 }
66 67
67 ChildProcessLauncherHelper::~ChildProcessLauncherHelper() { 68 ChildProcessLauncherHelper::~ChildProcessLauncherHelper() {
68 } 69 }
69 70
70 void ChildProcessLauncherHelper::StartLaunchOnClientThread() { 71 void ChildProcessLauncherHelper::StartLaunchOnClientThread() {
71 DCHECK_CURRENTLY_ON(client_thread_id_); 72 DCHECK_CURRENTLY_ON(client_thread_id_);
72 73
73 BeforeLaunchOnClientThread(); 74 BeforeLaunchOnClientThread();
74 75
75 mojo_server_handle_ = PrepareMojoPipeHandlesOnClientThread(); 76 mojo_server_handle_ = PrepareMojoPipeHandlesOnClientThread();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // On Posix, EnsureProcessTerminated can lead to 2 seconds of sleep! 157 // On Posix, EnsureProcessTerminated can lead to 2 seconds of sleep!
157 // So don't do this on the UI/IO threads. 158 // So don't do this on the UI/IO threads.
158 BrowserThread::PostTask( 159 BrowserThread::PostTask(
159 BrowserThread::PROCESS_LAUNCHER, FROM_HERE, 160 BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
160 base::Bind(&ChildProcessLauncherHelper::ForceNormalProcessTerminationSync, 161 base::Bind(&ChildProcessLauncherHelper::ForceNormalProcessTerminationSync,
161 base::Passed(&process))); 162 base::Passed(&process)));
162 } 163 }
163 164
164 } // namespace internal 165 } // namespace internal
165 } // namespace content 166 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/child_process_launcher_helper.h ('k') | content/browser/child_process_launcher_helper_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698