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

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

Issue 1532423003: Have each SandboxedProcessLauncherDelegate maintain a zygote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correctly initialize the sandbox_binary_ command before launching the zygote. Created 4 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
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/browser/gpu/compositor_util.h" 45 #include "content/browser/gpu/compositor_util.h"
46 #include "content/browser/gpu/gpu_data_manager_impl.h" 46 #include "content/browser/gpu/gpu_data_manager_impl.h"
47 #include "content/browser/gpu/gpu_process_host.h" 47 #include "content/browser/gpu/gpu_process_host.h"
48 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 48 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
49 #include "content/browser/histogram_synchronizer.h" 49 #include "content/browser/histogram_synchronizer.h"
50 #include "content/browser/loader/resource_dispatcher_host_impl.h" 50 #include "content/browser/loader/resource_dispatcher_host_impl.h"
51 #include "content/browser/media/media_internals.h" 51 #include "content/browser/media/media_internals.h"
52 #include "content/browser/mojo/mojo_shell_context.h" 52 #include "content/browser/mojo/mojo_shell_context.h"
53 #include "content/browser/net/browser_online_state_observer.h" 53 #include "content/browser/net/browser_online_state_observer.h"
54 #include "content/browser/renderer_host/media/media_stream_manager.h" 54 #include "content/browser/renderer_host/media/media_stream_manager.h"
55 #include "content/browser/renderer_host/render_process_host_impl.h"
55 #include "content/browser/speech/speech_recognition_manager_impl.h" 56 #include "content/browser/speech/speech_recognition_manager_impl.h"
56 #include "content/browser/startup_task_runner.h" 57 #include "content/browser/startup_task_runner.h"
57 #include "content/browser/time_zone_monitor.h" 58 #include "content/browser/time_zone_monitor.h"
59 #include "content/browser/utility_process_host_impl.h"
58 #include "content/browser/webui/content_web_ui_controller_factory.h" 60 #include "content/browser/webui/content_web_ui_controller_factory.h"
59 #include "content/browser/webui/url_data_manager.h" 61 #include "content/browser/webui/url_data_manager.h"
60 #include "content/common/content_switches_internal.h" 62 #include "content/common/content_switches_internal.h"
61 #include "content/common/host_discardable_shared_memory_manager.h" 63 #include "content/common/host_discardable_shared_memory_manager.h"
62 #include "content/common/host_shared_bitmap_manager.h" 64 #include "content/common/host_shared_bitmap_manager.h"
63 #include "content/common/resource_messages.h" 65 #include "content/common/resource_messages.h"
64 #include "content/public/browser/browser_main_parts.h" 66 #include "content/public/browser/browser_main_parts.h"
65 #include "content/public/browser/content_browser_client.h" 67 #include "content/public/browser/content_browser_client.h"
66 #include "content/public/browser/render_process_host.h" 68 #include "content/public/browser/render_process_host.h"
67 #include "content/public/browser/tracing_controller.h" 69 #include "content/public/browser/tracing_controller.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #if defined(OS_LINUX) && defined(USE_UDEV) 148 #if defined(OS_LINUX) && defined(USE_UDEV)
147 #include "content/browser/device_monitor_udev.h" 149 #include "content/browser/device_monitor_udev.h"
148 #elif defined(OS_MACOSX) && !defined(OS_IOS) 150 #elif defined(OS_MACOSX) && !defined(OS_IOS)
149 #include "content/browser/device_monitor_mac.h" 151 #include "content/browser/device_monitor_mac.h"
150 #endif 152 #endif
151 153
152 #if defined(OS_POSIX) && !defined(OS_MACOSX) 154 #if defined(OS_POSIX) && !defined(OS_MACOSX)
153 #include "content/browser/renderer_host/render_sandbox_host_linux.h" 155 #include "content/browser/renderer_host/render_sandbox_host_linux.h"
154 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 156 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
155 #include "sandbox/linux/suid/client/setuid_sandbox_host.h" 157 #include "sandbox/linux/suid/client/setuid_sandbox_host.h"
158
159 #if !defined(OS_ANDROID)
160 #include "content/browser/ppapi_plugin_process_host.h"
161 #endif
156 #endif 162 #endif
157 163
158 #if defined(ENABLE_PLUGINS) 164 #if defined(ENABLE_PLUGINS)
159 #include "content/browser/plugin_service_impl.h" 165 #include "content/browser/plugin_service_impl.h"
160 #endif 166 #endif
161 167
162 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) 168 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
163 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" 169 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
164 #endif 170 #endif
165 171
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // otherwise. 221 // otherwise.
216 LOG(FATAL) << no_suid_error; 222 LOG(FATAL) << no_suid_error;
217 } 223 }
218 } else { 224 } else {
219 LOG(ERROR) << no_suid_error; 225 LOG(ERROR) << no_suid_error;
220 } 226 }
221 227
222 // Tickle the sandbox host and zygote host so they fork now. 228 // Tickle the sandbox host and zygote host so they fork now.
223 RenderSandboxHostLinux::GetInstance()->Init(); 229 RenderSandboxHostLinux::GetInstance()->Init();
224 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value()); 230 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value());
231 RenderProcessHostImpl::EarlyZygoteLaunch();
232 PpapiPluginProcessHost::EarlyZygoteLaunch();
233 UtilityProcessHostImpl::EarlyZygoteLaunch();
225 } 234 }
226 #endif 235 #endif
227 236
228 #if defined(USE_GLIB) 237 #if defined(USE_GLIB)
229 static void GLibLogHandler(const gchar* log_domain, 238 static void GLibLogHandler(const gchar* log_domain,
230 GLogLevelFlags log_level, 239 GLogLevelFlags log_level,
231 const gchar* message, 240 const gchar* message,
232 gpointer userdata) { 241 gpointer userdata) {
233 if (!log_domain) 242 if (!log_domain)
234 log_domain = "<unknown>"; 243 log_domain = "<unknown>";
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 DCHECK(is_tracing_startup_for_duration_); 1471 DCHECK(is_tracing_startup_for_duration_);
1463 1472
1464 is_tracing_startup_for_duration_ = false; 1473 is_tracing_startup_for_duration_ = false;
1465 TracingController::GetInstance()->StopTracing( 1474 TracingController::GetInstance()->StopTracing(
1466 TracingController::CreateFileSink( 1475 TracingController::CreateFileSink(
1467 startup_trace_file_, 1476 startup_trace_file_,
1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1477 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1469 } 1478 }
1470 1479
1471 } // namespace content 1480 } // namespace content
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/browser/child_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698