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

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: 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
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..fce2c651a85e60b81eb026954903d2a159130465
--- /dev/null
+++ b/components/web_cache/renderer/web_cache_memory_dump_provider.h
@@ -0,0 +1,32 @@
+// 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/memory/singleton.h"
+#include "base/trace_event/memory_dump_provider.h"
+
+namespace web_cache {
+
+class WebCacheMemoryDumpProvider
+ : public base::trace_event::MemoryDumpProvider {
+ public:
+ static WebCacheMemoryDumpProvider* GetInstance();
+
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
+ private:
+ friend struct DefaultSingletonTraits<WebCacheMemoryDumpProvider>;
+
+ WebCacheMemoryDumpProvider();
+ ~WebCacheMemoryDumpProvider() override;
+
+ DISALLOW_COPY_AND_ASSIGN(WebCacheMemoryDumpProvider);
+};
+
+} // namespace web_cache
+
+#endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_MEMORY_DUMP_PROVIDER_H

Powered by Google App Engine
This is Rietveld 408576698