Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2741203002: memory-infra: Finish moving to Mojo (3nd attempt) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #include "media/audio/audio_system_impl.h" 96 #include "media/audio/audio_system_impl.h"
97 #include "media/base/media.h" 97 #include "media/base/media.h"
98 #include "media/base/user_input_monitor.h" 98 #include "media/base/user_input_monitor.h"
99 #include "media/midi/midi_service.h" 99 #include "media/midi/midi_service.h"
100 #include "mojo/edk/embedder/embedder.h" 100 #include "mojo/edk/embedder/embedder.h"
101 #include "mojo/edk/embedder/scoped_ipc_support.h" 101 #include "mojo/edk/embedder/scoped_ipc_support.h"
102 #include "net/base/network_change_notifier.h" 102 #include "net/base/network_change_notifier.h"
103 #include "net/socket/client_socket_factory.h" 103 #include "net/socket/client_socket_factory.h"
104 #include "net/ssl/ssl_config_service.h" 104 #include "net/ssl/ssl_config_service.h"
105 #include "ppapi/features/features.h" 105 #include "ppapi/features/features.h"
106 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
106 #include "services/service_manager/runner/common/client_util.h" 107 #include "services/service_manager/runner/common/client_util.h"
107 #include "skia/ext/event_tracer_impl.h" 108 #include "skia/ext/event_tracer_impl.h"
108 #include "skia/ext/skia_memory_dump_provider.h" 109 #include "skia/ext/skia_memory_dump_provider.h"
109 #include "sql/sql_memory_dump_provider.h" 110 #include "sql/sql_memory_dump_provider.h"
110 #include "ui/base/clipboard/clipboard.h" 111 #include "ui/base/clipboard/clipboard.h"
111 #include "ui/gfx/switches.h" 112 #include "ui/gfx/switches.h"
112 113
113 #if defined(USE_AURA) || defined(OS_MACOSX) 114 #if defined(USE_AURA) || defined(OS_MACOSX)
114 #include "content/browser/compositor/image_transport_factory.h" 115 #include "content/browser/compositor/image_transport_factory.h"
115 #endif 116 #endif
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 827 }
827 828
828 if (parsed_command_line_.HasSwitch( 829 if (parsed_command_line_.HasSwitch(
829 switches::kEnableAggressiveDOMStorageFlushing)) { 830 switches::kEnableAggressiveDOMStorageFlushing)) {
830 TRACE_EVENT0("startup", 831 TRACE_EVENT0("startup",
831 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay"); 832 "BrowserMainLoop::Subsystem:EnableAggressiveCommitDelay");
832 DOMStorageArea::EnableAggressiveCommitDelay(); 833 DOMStorageArea::EnableAggressiveCommitDelay();
833 LevelDBWrapperImpl::EnableAggressiveCommitDelay(); 834 LevelDBWrapperImpl::EnableAggressiveCommitDelay();
834 } 835 }
835 836
837 // Create the memory instrumentation service. It will initialize the memory
838 // dump manager, too. It makes sense that BrowserMainLoop owns the service;
839 // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown
840 // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
841 memory_instrumentation_coordinator_ =
842 base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
843 true /* initialize_memory_dump_manager */);
844
836 // Enable memory-infra dump providers. 845 // Enable memory-infra dump providers.
837 InitSkiaEventTracer(); 846 InitSkiaEventTracer();
838 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( 847 tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
839 base::kNullProcessId); 848 base::kNullProcessId);
840 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 849 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
841 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr); 850 HostSharedBitmapManager::current(), "HostSharedBitmapManager", nullptr);
842 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 851 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
843 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr); 852 skia::SkiaMemoryDumpProvider::GetInstance(), "Skia", nullptr);
844 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 853 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
845 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr); 854 sql::SqlMemoryDumpProvider::GetInstance(), "Sql", nullptr);
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1792 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1784 MediaInternals::GetInstance()); 1793 MediaInternals::GetInstance());
1785 } 1794 }
1786 CHECK(audio_manager_); 1795 CHECK(audio_manager_);
1787 1796
1788 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1797 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1789 CHECK(audio_system_); 1798 CHECK(audio_system_);
1790 } 1799 }
1791 1800
1792 } // namespace content 1801 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.h ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698