| OLD | NEW |
| 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 #include "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 208 } |
| 209 | 209 |
| 210 // Load pepper plugins before engaging the sandbox. | 210 // Load pepper plugins before engaging the sandbox. |
| 211 PepperPluginRegistry::GetInstance(); | 211 PepperPluginRegistry::GetInstance(); |
| 212 | 212 |
| 213 { | 213 { |
| 214 #if defined(OS_WIN) || defined(OS_MACOSX) | 214 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 215 // TODO(markus): Check if it is OK to unconditionally move this | 215 // TODO(markus): Check if it is OK to unconditionally move this |
| 216 // instruction down. | 216 // instruction down. |
| 217 RenderProcessImpl render_process; | 217 RenderProcessImpl render_process; |
| 218 render_process.set_main_thread(new RenderThreadImpl()); | 218 new RenderThreadImpl(); |
| 219 #endif | 219 #endif |
| 220 bool run_loop = true; | 220 bool run_loop = true; |
| 221 if (!no_sandbox) { | 221 if (!no_sandbox) { |
| 222 run_loop = platform.EnableSandbox(); | 222 run_loop = platform.EnableSandbox(); |
| 223 } else { | 223 } else { |
| 224 LOG(ERROR) << "Running without renderer sandbox"; | 224 LOG(ERROR) << "Running without renderer sandbox"; |
| 225 } | 225 } |
| 226 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 226 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 227 RenderProcessImpl render_process; | 227 RenderProcessImpl render_process; |
| 228 render_process.set_main_thread(new RenderThreadImpl()); | 228 new RenderThreadImpl(); |
| 229 #endif | 229 #endif |
| 230 | 230 |
| 231 platform.RunSandboxTests(); | 231 platform.RunSandboxTests(); |
| 232 | 232 |
| 233 startup_timer.Stop(); // End of Startup Time Measurement. | 233 startup_timer.Stop(); // End of Startup Time Measurement. |
| 234 | 234 |
| 235 if (run_loop) { | 235 if (run_loop) { |
| 236 #if defined(OS_MACOSX) | 236 #if defined(OS_MACOSX) |
| 237 if (pool) | 237 if (pool) |
| 238 pool->Recycle(); | 238 pool->Recycle(); |
| 239 #endif | 239 #endif |
| 240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 240 TRACE_EVENT_BEGIN_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 241 MessageLoop::current()->Run(); | 241 MessageLoop::current()->Run(); |
| 242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); | 242 TRACE_EVENT_END_ETW("RendererMain.START_MSG_LOOP", 0, 0); |
| 243 } | 243 } |
| 244 } | 244 } |
| 245 platform.PlatformUninitialize(); | 245 platform.PlatformUninitialize(); |
| 246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); | 246 TRACE_EVENT_END_ETW("RendererMain", 0, ""); |
| 247 return 0; | 247 return 0; |
| 248 } | 248 } |
| OLD | NEW |