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

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

Issue 9463029: Add an API around zygoteHost so that chrome doesn't reach into the internal content implementation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix clang Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | content/browser/child_process_launcher.cc » ('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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include <dbus/dbus-glib.h> 61 #include <dbus/dbus-glib.h>
62 #endif 62 #endif
63 63
64 #if defined(TOOLKIT_USES_GTK) 64 #if defined(TOOLKIT_USES_GTK)
65 #include "ui/gfx/gtk_util.h" 65 #include "ui/gfx/gtk_util.h"
66 #endif 66 #endif
67 67
68 #if defined(OS_POSIX) && !defined(OS_MACOSX) 68 #if defined(OS_POSIX) && !defined(OS_MACOSX)
69 #include <sys/stat.h> 69 #include <sys/stat.h>
70 #include "content/browser/renderer_host/render_sandbox_host_linux.h" 70 #include "content/browser/renderer_host/render_sandbox_host_linux.h"
71 #include "content/browser/zygote_host_linux.h" 71 #include "content/browser/zygote_host_impl_linux.h"
72 #endif 72 #endif
73 73
74 #if defined(USE_X11) 74 #if defined(USE_X11)
75 #include <X11/Xlib.h> 75 #include <X11/Xlib.h>
76 #endif 76 #endif
77 77
78 // One of the linux specific headers defines this as a macro. 78 // One of the linux specific headers defines this as a macro.
79 #ifdef DestroyAll 79 #ifdef DestroyAll
80 #undef DestroyAll 80 #undef DestroyAll
81 #endif 81 #endif
(...skipping 16 matching lines...) Expand all
98 #if defined(LINUX_SANDBOX_PATH) 98 #if defined(LINUX_SANDBOX_PATH)
99 if (!sandbox_binary) 99 if (!sandbox_binary)
100 sandbox_binary = LINUX_SANDBOX_PATH; 100 sandbox_binary = LINUX_SANDBOX_PATH;
101 #endif 101 #endif
102 102
103 std::string sandbox_cmd; 103 std::string sandbox_cmd;
104 if (sandbox_binary && !parsed_command_line.HasSwitch(switches::kNoSandbox)) 104 if (sandbox_binary && !parsed_command_line.HasSwitch(switches::kNoSandbox))
105 sandbox_cmd = sandbox_binary; 105 sandbox_cmd = sandbox_binary;
106 106
107 // Tickle the sandbox host and zygote host so they fork now. 107 // Tickle the sandbox host and zygote host so they fork now.
108 RenderSandboxHostLinux* shost = RenderSandboxHostLinux::GetInstance(); 108 RenderSandboxHostLinux::GetInstance()->Init(sandbox_cmd);
109 shost->Init(sandbox_cmd); 109 ZygoteHostImpl::GetInstance()->Init(sandbox_cmd);
110 ZygoteHost* zhost = ZygoteHost::GetInstance();
111 zhost->Init(sandbox_cmd);
112 } 110 }
113 #endif 111 #endif
114 112
115 #if defined(OS_LINUX) || defined(OS_OPENBSD) 113 #if defined(OS_LINUX) || defined(OS_OPENBSD)
116 static void GLibLogHandler(const gchar* log_domain, 114 static void GLibLogHandler(const gchar* log_domain,
117 GLogLevelFlags log_level, 115 GLogLevelFlags log_level,
118 const gchar* message, 116 const gchar* message,
119 gpointer userdata) { 117 gpointer userdata) {
120 if (!log_domain) 118 if (!log_domain)
121 log_domain = "<unknown>"; 119 log_domain = "<unknown>";
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 628 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
631 629
632 #if defined(OS_MACOSX) 630 #if defined(OS_MACOSX)
633 MessageLoopForUI::current()->Run(); 631 MessageLoopForUI::current()->Run();
634 #else 632 #else
635 MessageLoopForUI::current()->RunWithDispatcher(NULL); 633 MessageLoopForUI::current()->RunWithDispatcher(NULL);
636 #endif 634 #endif
637 } 635 }
638 636
639 } // namespace content 637 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698