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 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 parts_->PostDestroyThreads(); | 1162 parts_->PostDestroyThreads(); |
1163 } | 1163 } |
1164 } | 1164 } |
1165 | 1165 |
1166 void BrowserMainLoop::StopStartupTracingTimer() { | 1166 void BrowserMainLoop::StopStartupTracingTimer() { |
1167 startup_trace_timer_.Stop(); | 1167 startup_trace_timer_.Stop(); |
1168 } | 1168 } |
1169 | 1169 |
1170 void BrowserMainLoop::InitializeMainThread() { | 1170 void BrowserMainLoop::InitializeMainThread() { |
1171 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); | 1171 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); |
1172 static const char kThreadName[] = "CrBrowserMain"; | 1172 base::PlatformThread::SetName("CrBrowserMain"); |
1173 base::PlatformThread::SetName(kThreadName); | |
1174 if (main_message_loop_) | |
1175 main_message_loop_->set_thread_name(kThreadName); | |
1176 | 1173 |
1177 // Register the main thread by instantiating it, but don't call any methods. | 1174 // Register the main thread by instantiating it, but don't call any methods. |
1178 main_thread_.reset( | 1175 main_thread_.reset( |
1179 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); | 1176 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); |
1180 } | 1177 } |
1181 | 1178 |
1182 int BrowserMainLoop::BrowserThreadsStarted() { | 1179 int BrowserMainLoop::BrowserThreadsStarted() { |
1183 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1180 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
1184 | 1181 |
1185 // Bring up Mojo IPC and shell as early as possible. | 1182 // Bring up Mojo IPC and shell as early as possible. |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 std::move(worker_task_runner), | 1526 std::move(worker_task_runner), |
1530 MediaInternals::GetInstance()); | 1527 MediaInternals::GetInstance()); |
1531 } | 1528 } |
1532 CHECK(audio_manager_); | 1529 CHECK(audio_manager_); |
1533 | 1530 |
1534 if (use_hang_monitor) | 1531 if (use_hang_monitor) |
1535 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1532 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
1536 } | 1533 } |
1537 | 1534 |
1538 } // namespace content | 1535 } // namespace content |
OLD | NEW |