| 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 parts_->PostDestroyThreads(); | 1137 parts_->PostDestroyThreads(); |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 void BrowserMainLoop::StopStartupTracingTimer() { | 1141 void BrowserMainLoop::StopStartupTracingTimer() { |
| 1142 startup_trace_timer_.Stop(); | 1142 startup_trace_timer_.Stop(); |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 void BrowserMainLoop::InitializeMainThread() { | 1145 void BrowserMainLoop::InitializeMainThread() { |
| 1146 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); | 1146 TRACE_EVENT0("startup", "BrowserMainLoop::InitializeMainThread"); |
| 1147 static const char kThreadName[] = "CrBrowserMain"; | 1147 base::PlatformThread::SetName("CrBrowserMain"); |
| 1148 base::PlatformThread::SetName(kThreadName); | |
| 1149 if (main_message_loop_) | |
| 1150 main_message_loop_->set_thread_name(kThreadName); | |
| 1151 | 1148 |
| 1152 // Register the main thread by instantiating it, but don't call any methods. | 1149 // Register the main thread by instantiating it, but don't call any methods. |
| 1153 main_thread_.reset( | 1150 main_thread_.reset( |
| 1154 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); | 1151 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); |
| 1155 } | 1152 } |
| 1156 | 1153 |
| 1157 int BrowserMainLoop::BrowserThreadsStarted() { | 1154 int BrowserMainLoop::BrowserThreadsStarted() { |
| 1158 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1155 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
| 1159 | 1156 |
| 1160 // Bring up Mojo IPC and shell as early as possible. | 1157 // Bring up Mojo IPC and shell as early as possible. |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 std::move(worker_task_runner), | 1501 std::move(worker_task_runner), |
| 1505 MediaInternals::GetInstance()); | 1502 MediaInternals::GetInstance()); |
| 1506 } | 1503 } |
| 1507 CHECK(audio_manager_); | 1504 CHECK(audio_manager_); |
| 1508 | 1505 |
| 1509 if (use_hang_monitor) | 1506 if (use_hang_monitor) |
| 1510 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1507 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
| 1511 } | 1508 } |
| 1512 | 1509 |
| 1513 } // namespace content | 1510 } // namespace content |
| OLD | NEW |