OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/hi_res_timer_manager.h" | 10 #include "app/hi_res_timer_manager.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // As long as we use Cocoa in the renderer (for the forseeable future as of | 229 // As long as we use Cocoa in the renderer (for the forseeable future as of |
230 // now; see http://crbug.com/13890 for info) we need to have a UI loop. | 230 // now; see http://crbug.com/13890 for info) we need to have a UI loop. |
231 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 231 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
232 #else | 232 #else |
233 // The main message loop of the renderer services doesn't have IO or UI tasks, | 233 // The main message loop of the renderer services doesn't have IO or UI tasks, |
234 // unless in-process-plugins is used. | 234 // unless in-process-plugins is used. |
235 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ? | 235 MessageLoop main_message_loop(RenderProcessImpl::InProcessPlugins() ? |
236 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT); | 236 MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT); |
237 #endif | 237 #endif |
238 | 238 |
239 std::wstring app_name = chrome::kBrowserAppName; | 239 PlatformThread::SetName("CrRendererMain"); |
240 PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str()); | |
241 | 240 |
242 SystemMonitor system_monitor; | 241 SystemMonitor system_monitor; |
243 HighResolutionTimerManager hi_res_timer_manager; | 242 HighResolutionTimerManager hi_res_timer_manager; |
244 | 243 |
245 platform.PlatformInitialize(); | 244 platform.PlatformInitialize(); |
246 | 245 |
247 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); | 246 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); |
248 platform.InitSandboxTests(no_sandbox); | 247 platform.InitSandboxTests(no_sandbox); |
249 | 248 |
250 // Initialize histogram statistics gathering system. | 249 // Initialize histogram statistics gathering system. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 288 |
290 if (run_loop) { | 289 if (run_loop) { |
291 if (pool) | 290 if (pool) |
292 pool->Recycle(); | 291 pool->Recycle(); |
293 MessageLoop::current()->Run(); | 292 MessageLoop::current()->Run(); |
294 } | 293 } |
295 } | 294 } |
296 platform.PlatformUninitialize(); | 295 platform.PlatformUninitialize(); |
297 return 0; | 296 return 0; |
298 } | 297 } |
OLD | NEW |