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

Unified Diff: components/web_cache/renderer/web_cache_memory_dump_provider.h

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: get() -> pointer() 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
Index: components/web_cache/renderer/web_cache_memory_dump_provider.h
diff --git a/components/web_cache/renderer/web_cache_memory_dump_provider.h b/components/web_cache/renderer/web_cache_memory_dump_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..75c65ea1497f220759009896cc0338e17fa95df6
--- /dev/null
+++ b/components/web_cache/renderer/web_cache_memory_dump_provider.h
@@ -0,0 +1,33 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H
+#define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H
+
+#include "base/lazy_instance.h"
+#include "base/trace_event/memory_dump_provider.h"
+
+namespace web_cache {
+
+class WebCacheMemoryDumpProvider
+ : public base::trace_event::MemoryDumpProvider {
+ public:
+ static WebCacheMemoryDumpProvider* GetInstance();
+
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
+ private:
+ friend struct base::DefaultLazyInstanceTraits<WebCacheMemoryDumpProvider>;
+
+ WebCacheMemoryDumpProvider();
+ ~WebCacheMemoryDumpProvider() override;
+
+ DISALLOW_COPY_AND_ASSIGN(WebCacheMemoryDumpProvider);
+};
+
+} // namespace web_cache
+
+#endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H
« no previous file with comments | « components/web_cache/renderer/BUILD.gn ('k') | components/web_cache/renderer/web_cache_memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698