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

Unified Diff: content/child/blink_platform_impl.cc

Issue 1283793004: [tracing] Add WebCache memory usage in Blink to chrome://tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unregister. Created 5 years, 4 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
« content/child/DEPS ('K') | « content/child/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index d743fffac4636fee02a2845e2dc1a113205cf13d..a88969412cb883d3bdf85304e567c001f212e881 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -35,6 +35,7 @@
#include "blink/public/resources/grit/blink_resources.h"
#include "components/mime_util/mime_util.h"
#include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
+#include "components/web_cache/renderer/web_cache_memory_dump_provider.h"
#include "content/app/resources/grit/content_resources.h"
#include "content/app/strings/grit/content_strings.h"
#include "content/child/background_sync/background_sync_provider.h"
@@ -461,6 +462,10 @@ void BlinkPlatformImpl::InternalInit() {
ChildThreadImpl::current()->service_registry()));
sync_provider_.reset(new BackgroundSyncProvider(
ChildThreadImpl::current()->service_registry()));
+
+ base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
+ web_cache::WebCacheMemoryDumpProvider::GetInstance(),
+ main_thread_task_runner_);
}
}
@@ -470,6 +475,8 @@ void BlinkPlatformImpl::UpdateWebThreadTLS(blink::WebThread* thread) {
}
BlinkPlatformImpl::~BlinkPlatformImpl() {
+ base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
+ web_cache::WebCacheMemoryDumpProvider::GetInstance());
}
WebURLLoader* BlinkPlatformImpl::createURLLoader() {
« content/child/DEPS ('K') | « content/child/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698