| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); | 1161 new BrowserThreadImpl(BrowserThread::UI, base::MessageLoop::current())); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 int BrowserMainLoop::BrowserThreadsStarted() { | 1164 int BrowserMainLoop::BrowserThreadsStarted() { |
| 1165 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); | 1165 TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted"); |
| 1166 | 1166 |
| 1167 // Bring up Mojo IPC and shell as early as possible. | 1167 // Bring up Mojo IPC and shell as early as possible. |
| 1168 mojo_ipc_support_.reset(new IPC::ScopedIPCSupport( | 1168 mojo_ipc_support_.reset(new IPC::ScopedIPCSupport( |
| 1169 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 1169 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
| 1170 ->task_runner())); | 1170 ->task_runner())); |
| 1171 mojo_shell_context_.reset(new MojoShellContext); | 1171 mojo_shell_context_.reset(new MojoShellContext(file_thread_->task_runner(), |
| 1172 db_thread_->task_runner())); |
| 1172 #if defined(OS_MACOSX) | 1173 #if defined(OS_MACOSX) |
| 1173 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); | 1174 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); |
| 1174 #endif // defined(OS_MACOSX) | 1175 #endif // defined(OS_MACOSX) |
| 1175 | 1176 |
| 1176 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1177 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
| 1177 indexed_db_thread_->Start(); | 1178 indexed_db_thread_->Start(); |
| 1178 | 1179 |
| 1179 HistogramSynchronizer::GetInstance(); | 1180 HistogramSynchronizer::GetInstance(); |
| 1180 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 1181 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 1181 // Up the priority of the UI thread. | 1182 // Up the priority of the UI thread. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 DCHECK(is_tracing_startup_for_duration_); | 1446 DCHECK(is_tracing_startup_for_duration_); |
| 1446 | 1447 |
| 1447 is_tracing_startup_for_duration_ = false; | 1448 is_tracing_startup_for_duration_ = false; |
| 1448 TracingController::GetInstance()->StopTracing( | 1449 TracingController::GetInstance()->StopTracing( |
| 1449 TracingController::CreateFileSink( | 1450 TracingController::CreateFileSink( |
| 1450 startup_trace_file_, | 1451 startup_trace_file_, |
| 1451 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1452 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1452 } | 1453 } |
| 1453 | 1454 |
| 1454 } // namespace content | 1455 } // namespace content |
| OLD | NEW |