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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 parts_->PostDestroyThreads(); | 1176 parts_->PostDestroyThreads(); |
1177 } | 1177 } |
1178 } | 1178 } |
1179 | 1179 |
1180 void BrowserMainLoop::StopStartupTracingTimer() { | 1180 void BrowserMainLoop::StopStartupTracingTimer() { |
1181 startup_trace_timer_.Stop(); | 1181 startup_trace_timer_.Stop(); |
1182 } | 1182 } |
1183 | 1183 |
1184 void BrowserMainLoop::InitializeMainThread() { | 1184 void BrowserMainLoop::InitializeMainThread() { |
1185 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); | 1185 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); |
1186 static const char kThreadName[] = "CrBrowserMain"; | 1186 base::PlatformThread::SetName("CrBrowserMain"); |
1187 base::PlatformThread::SetName(kThreadName); | |
1188 if (main_message_loop_) | |
1189 main_message_loop_->set_thread_name(kThreadName); | |
1190 | 1187 |
1191 // Register the main thread by instantiating it, but don't call any methods. | 1188 // Register the main thread by instantiating it, but don't call any methods. |
1192 main_thread_.reset( | 1189 main_thread_.reset( |
1193 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); | 1190 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); |
1194 } | 1191 } |
1195 | 1192 |
1196 int BrowserMainLoop::BrowserThreadsStarted() { | 1193 int BrowserMainLoop::BrowserThreadsStarted() { |
1197 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1194 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
1198 | 1195 |
1199 // Bring up Mojo IPC and shell as early as possible. | 1196 // Bring up Mojo IPC and shell as early as possible. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 std::move(worker_task_runner), | 1538 std::move(worker_task_runner), |
1542 MediaInternals::GetInstance()); | 1539 MediaInternals::GetInstance()); |
1543 } | 1540 } |
1544 CHECK(audio_manager_); | 1541 CHECK(audio_manager_); |
1545 | 1542 |
1546 if (use_hang_monitor) | 1543 if (use_hang_monitor) |
1547 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1544 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
1548 } | 1545 } |
1549 | 1546 |
1550 } // namespace content | 1547 } // namespace content |
OLD | NEW |