OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <utility> | 6 #include <utility> |
7 | 7 |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
11 #include "base/debug/leak_annotations.h" | 11 #include "base/debug/leak_annotations.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
15 #include "base/metrics/statistics_recorder.h" | 15 #include "base/metrics/statistics_recorder.h" |
16 #include "base/pending_task.h" | 16 #include "base/pending_task.h" |
| 17 #include "base/run_loop.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
19 #include "base/threading/platform_thread.h" | 20 #include "base/threading/platform_thread.h" |
20 #include "base/timer/hi_res_timer_manager.h" | 21 #include "base/timer/hi_res_timer_manager.h" |
21 #include "base/trace_event/trace_event.h" | 22 #include "base/trace_event/trace_event.h" |
22 #include "build/build_config.h" | 23 #include "build/build_config.h" |
23 #include "components/scheduler/renderer/renderer_scheduler.h" | 24 #include "components/scheduler/renderer/renderer_scheduler.h" |
24 #include "content/child/child_process.h" | 25 #include "content/child/child_process.h" |
25 #include "content/common/content_constants_internal.h" | 26 #include "content/common/content_constants_internal.h" |
26 #include "content/common/mojo/mojo_shell_connection_impl.h" | 27 #include "content/common/mojo/mojo_shell_connection_impl.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 #endif | 188 #endif |
188 | 189 |
189 base::HighResolutionTimerManager hi_res_timer_manager; | 190 base::HighResolutionTimerManager hi_res_timer_manager; |
190 | 191 |
191 if (run_loop) { | 192 if (run_loop) { |
192 #if defined(OS_MACOSX) | 193 #if defined(OS_MACOSX) |
193 if (pool) | 194 if (pool) |
194 pool->Recycle(); | 195 pool->Recycle(); |
195 #endif | 196 #endif |
196 TRACE_EVENT_ASYNC_BEGIN0("toplevel", "RendererMain.START_MSG_LOOP", 0); | 197 TRACE_EVENT_ASYNC_BEGIN0("toplevel", "RendererMain.START_MSG_LOOP", 0); |
197 base::MessageLoop::current()->Run(); | 198 base::RunLoop().Run(); |
198 TRACE_EVENT_ASYNC_END0("toplevel", "RendererMain.START_MSG_LOOP", 0); | 199 TRACE_EVENT_ASYNC_END0("toplevel", "RendererMain.START_MSG_LOOP", 0); |
199 } | 200 } |
200 | 201 |
201 #if defined(LEAK_SANITIZER) | 202 #if defined(LEAK_SANITIZER) |
202 // Run leak detection before RenderProcessImpl goes out of scope. This helps | 203 // Run leak detection before RenderProcessImpl goes out of scope. This helps |
203 // ignore shutdown-only leaks. | 204 // ignore shutdown-only leaks. |
204 __lsan_do_leak_check(); | 205 __lsan_do_leak_check(); |
205 #endif | 206 #endif |
206 } | 207 } |
207 platform.PlatformUninitialize(); | 208 platform.PlatformUninitialize(); |
208 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); | 209 TRACE_EVENT_ASYNC_END0("startup", "RendererMain", 0); |
209 return 0; | 210 return 0; |
210 } | 211 } |
211 | 212 |
212 } // namespace content | 213 } // namespace content |
OLD | NEW |