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

Unified Diff: third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h

Issue 1369253002: Add Web Resources usage to chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache2_base
Patch Set: Use singleton provider. Created 5 years, 2 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: third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h
diff --git a/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h b/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.h
new file mode 100644
index 0000000000000000000000000000000000000000..a4831b0c028b2244f3caa21ff35c2f6ad4745bdf
--- /dev/null
+++ b/third_party/WebKit/Source/core/fetch/WebCacheMemoryDumpProvider.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 WebCacheMemoryDumpProvider_h
+#define WebCacheMemoryDumpProvider_h
+
+#include "core/fetch/MemoryCache.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/WebCommon.h"
+#include "public/platform/WebMemoryDumpProvider.h"
+
+namespace blink {
+
+class BLINK_PLATFORM_EXPORT WebCacheMemoryDumpProvider final : public WebMemoryDumpProvider {
haraken 2015/10/14 00:57:41 It seems strange to put WebXXX in core/. WebXXX ne
ssid 2015/10/14 05:01:22 I think it's the name only should be changed here.
haraken 2015/10/14 05:09:44 The WebCacheMemoryDumpProvider inherits from WebMe
ssid 2015/10/14 06:13:17 Platform cannot use core. So I cannot use memory c
haraken 2015/10/14 08:15:44 Inheriting public/platform/ from core/ sounds a bi
haraken 2015/10/14 09:04:07 BLINK_PLATFORM_EXPORT => CORE_EXPORT
ssid 2015/10/14 12:06:40 Done.
+public:
+ static WebCacheMemoryDumpProvider* instance();
haraken 2015/10/14 09:04:07 Add a comment on why this needs to be a singleton.
ssid 2015/10/14 12:06:40 Done.
+ ~WebCacheMemoryDumpProvider() override;
+
+ // WebMemoryDumpProvider implementation.
+ bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
+
+ void setMemoryCache(MemoryCache* memoryCache) { m_memoryCache = memoryCache; }
Primiano Tucci (use gerrit) 2015/10/14 11:06:58 is there a way to check that the thread on which s
ssid 2015/10/14 12:06:40 Done.
+
+private:
+ WebCacheMemoryDumpProvider();
+
+ WeakPersistent<MemoryCache> m_memoryCache;
+};
+
+} // namespace blink
+
+#endif // WebCacheMemoryDumpProvider_h

Powered by Google App Engine
This is Rietveld 408576698