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

Side by Side Diff: content/renderer/renderer_main.cc

Issue 7006006: Replace OS_LINUX ifdefs with OS_POSIX & !OS_MACOSX, TOOLKIT_USES_GTK, or (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(OS_MACOSX) 5 #if defined(OS_MACOSX)
6 #include <signal.h> 6 #include <signal.h>
7 #include <unistd.h> 7 #include <unistd.h>
8 #endif // OS_MACOSX 8 #endif // OS_MACOSX
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 std::string persistent = parsed_command_line.GetSwitchValueASCII( 200 std::string persistent = parsed_command_line.GetSwitchValueASCII(
201 switches::kForceFieldTestNameAndValue); 201 switches::kForceFieldTestNameAndValue);
202 bool ret = field_trial.CreateTrialsInChildProcess(persistent); 202 bool ret = field_trial.CreateTrialsInChildProcess(persistent);
203 DCHECK(ret); 203 DCHECK(ret);
204 } 204 }
205 205
206 // Load pepper plugins before engaging the sandbox. 206 // Load pepper plugins before engaging the sandbox.
207 PepperPluginRegistry::GetInstance(); 207 PepperPluginRegistry::GetInstance();
208 208
209 { 209 {
210 #if !defined(OS_LINUX) 210 #if defined(OS_WIN) || defined(OS_MACOSX)
211 // TODO(markus): Check if it is OK to unconditionally move this 211 // TODO(markus): Check if it is OK to unconditionally move this
212 // instruction down. 212 // instruction down.
213 RenderProcessImpl render_process; 213 RenderProcessImpl render_process;
214 render_process.set_main_thread(new RenderThread()); 214 render_process.set_main_thread(new RenderThread());
215 #endif 215 #endif
216 bool run_loop = true; 216 bool run_loop = true;
217 if (!no_sandbox) { 217 if (!no_sandbox) {
218 run_loop = platform.EnableSandbox(); 218 run_loop = platform.EnableSandbox();
219 } else { 219 } else {
220 LOG(ERROR) << "Running without renderer sandbox"; 220 LOG(ERROR) << "Running without renderer sandbox";
221 } 221 }
222 #if defined(OS_LINUX) 222 #if defined(OS_POSIX) && !defined(OS_MACOSX)
223 RenderProcessImpl render_process; 223 RenderProcessImpl render_process;
224 render_process.set_main_thread(new RenderThread()); 224 render_process.set_main_thread(new RenderThread());
225 #endif 225 #endif
226 226
227 platform.RunSandboxTests(); 227 platform.RunSandboxTests();
228 228
229 startup_timer.Stop(); // End of Startup Time Measurement. 229 startup_timer.Stop(); // End of Startup Time Measurement.
230 230
231 if (run_loop) { 231 if (run_loop) {
232 if (pool) 232 if (pool)
233 pool->Recycle(); 233 pool->Recycle();
234 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); 234 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0);
235 MessageLoop::current()->Run(); 235 MessageLoop::current()->Run();
236 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); 236 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0);
237 } 237 }
238 } 238 }
239 platform.PlatformUninitialize(); 239 platform.PlatformUninitialize();
240 TRACE_EVENT_END_ETW("RendererMain", 0, ""); 240 TRACE_EVENT_END_ETW("RendererMain", 0, "");
241 return 0; 241 return 0;
242 } 242 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/renderer_webkitclient_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698