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

Unified Diff: third_party/WebKit/Source/core/fetch/MemoryCache.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: Nits/. Created 5 years, 3 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/MemoryCache.h
diff --git a/third_party/WebKit/Source/core/fetch/MemoryCache.h b/third_party/WebKit/Source/core/fetch/MemoryCache.h
index 92664bd164a14164a5a4f453c3361ac3aa586616..a82632c2bca331d087e25cbb063aff2c1f44428e 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.h
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.h
@@ -28,6 +28,7 @@
#include "core/CoreExport.h"
#include "core/fetch/Resource.h"
#include "core/fetch/ResourcePtr.h"
+#include "public/platform/WebMemoryDumpProvider.h"
#include "public/platform/WebThread.h"
#include "wtf/Allocator.h"
#include "wtf/HashMap.h"
@@ -130,7 +131,7 @@ WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::MemoryCacheLRUList);
namespace blink {
-class CORE_EXPORT MemoryCache final : public GarbageCollectedFinalized<MemoryCache>, public WebThread::TaskObserver {
+class CORE_EXPORT MemoryCache final : public GarbageCollectedFinalized<MemoryCache>, public WebThread::TaskObserver, public WebMemoryDumpProvider {
WTF_MAKE_NONCOPYABLE(MemoryCache);
public:
static MemoryCache* create();
@@ -233,6 +234,9 @@ public:
void updateFramePaintTimestamp();
+ // WebMemoryDumpProvider implementation
+ bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
+
private:
enum PruneStrategy {
// Automatically decide how much to prune.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | third_party/WebKit/Source/core/fetch/Resource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698