| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "crypto/nss_util.h" | 63 #include "crypto/nss_util.h" |
| 64 #include "device/battery/battery_status_service.h" | 64 #include "device/battery/battery_status_service.h" |
| 65 #include "media/audio/audio_manager.h" | 65 #include "media/audio/audio_manager.h" |
| 66 #include "media/base/media.h" | 66 #include "media/base/media.h" |
| 67 #include "media/base/user_input_monitor.h" | 67 #include "media/base/user_input_monitor.h" |
| 68 #include "media/midi/midi_manager.h" | 68 #include "media/midi/midi_manager.h" |
| 69 #include "net/base/network_change_notifier.h" | 69 #include "net/base/network_change_notifier.h" |
| 70 #include "net/socket/client_socket_factory.h" | 70 #include "net/socket/client_socket_factory.h" |
| 71 #include "net/ssl/ssl_config_service.h" | 71 #include "net/ssl/ssl_config_service.h" |
| 72 #include "skia/ext/skia_memory_dump_provider.h" | 72 #include "skia/ext/skia_memory_dump_provider.h" |
| 73 #include "sql/sql_memory_dump_provider.h" |
| 73 #include "ui/base/clipboard/clipboard.h" | 74 #include "ui/base/clipboard/clipboard.h" |
| 74 | 75 |
| 75 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) | 76 #if defined(USE_AURA) || (defined(OS_MACOSX) && !defined(OS_IOS)) |
| 76 #include "content/browser/compositor/image_transport_factory.h" | 77 #include "content/browser/compositor/image_transport_factory.h" |
| 77 #endif | 78 #endif |
| 78 | 79 |
| 79 #if defined(USE_AURA) | 80 #if defined(USE_AURA) |
| 80 #include "content/public/browser/context_factory.h" | 81 #include "content/public/browser/context_factory.h" |
| 81 #include "ui/aura/env.h" | 82 #include "ui/aura/env.h" |
| 82 #endif | 83 #endif |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 TRACE_EVENT0("startup", | 650 TRACE_EVENT0("startup", |
| 650 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); | 651 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); |
| 651 DOMStorageArea::EnableAggressiveCommitDelay(); | 652 DOMStorageArea::EnableAggressiveCommitDelay(); |
| 652 } | 653 } |
| 653 | 654 |
| 654 // Enable memory-infra dump providers. | 655 // Enable memory-infra dump providers. |
| 655 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 656 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 656 HostSharedBitmapManager::current()); | 657 HostSharedBitmapManager::current()); |
| 657 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 658 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 658 skia::SkiaMemoryDumpProvider::GetInstance()); | 659 skia::SkiaMemoryDumpProvider::GetInstance()); |
| 660 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 661 sql::SqlMemoryDumpProvider::GetInstance()); |
| 659 | 662 |
| 660 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) | 663 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) |
| 661 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( | 664 trace_memory_controller_.reset(new base::trace_event::TraceMemoryController( |
| 662 base::MessageLoop::current()->task_runner(), | 665 base::MessageLoop::current()->task_runner(), |
| 663 ::HeapProfilerWithPseudoStackStart, ::HeapProfilerStop, | 666 ::HeapProfilerWithPseudoStackStart, ::HeapProfilerStop, |
| 664 ::GetHeapProfile)); | 667 ::GetHeapProfile)); |
| 665 #endif | 668 #endif |
| 666 } | 669 } |
| 667 | 670 |
| 668 int BrowserMainLoop::PreCreateThreads() { | 671 int BrowserMainLoop::PreCreateThreads() { |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 DCHECK(is_tracing_startup_for_duration_); | 1395 DCHECK(is_tracing_startup_for_duration_); |
| 1393 | 1396 |
| 1394 is_tracing_startup_for_duration_ = false; | 1397 is_tracing_startup_for_duration_ = false; |
| 1395 TracingController::GetInstance()->DisableRecording( | 1398 TracingController::GetInstance()->DisableRecording( |
| 1396 TracingController::CreateFileSink( | 1399 TracingController::CreateFileSink( |
| 1397 startup_trace_file_, | 1400 startup_trace_file_, |
| 1398 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1401 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
| 1399 } | 1402 } |
| 1400 | 1403 |
| 1401 } // namespace content | 1404 } // namespace content |
| OLD | NEW |