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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index a3db3aaf91d97c0307503e8835f1348fe404fd8c..be43ea2c66bbe393a9465ac7ac3bed19d113f9c3 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -103,6 +103,7 @@
#include "net/socket/client_socket_factory.h"
#include "net/ssl/ssl_config_service.h"
#include "ppapi/features/features.h"
+#include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
#include "services/service_manager/runner/common/client_util.h"
#include "skia/ext/event_tracer_impl.h"
#include "skia/ext/skia_memory_dump_provider.h"
@@ -833,6 +834,14 @@ void BrowserMainLoop::PostMainMessageLoopStart() {
LevelDBWrapperImpl::EnableAggressiveCommitDelay();
}
+ // Create the memory instrumentation service. It will initialize the memory
+ // dump manager, too. It makes sense that BrowserMainLoop owns the service;
+ // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown
+ // in BrowserMainLoop::ShutdownThreadsAndCleanupIO.
+ memory_instrumentation_coordinator_ =
+ base::MakeUnique<memory_instrumentation::CoordinatorImpl>(
+ true /* initialize_memory_dump_manager */);
+
// Enable memory-infra dump providers.
InitSkiaEventTracer();
tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
« 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