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

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

Issue 2230433002: Add MemoryCoordinatorClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 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: 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 a2522aa856b467c2fe2e92c152a66ca3140c09aa..8e562bda8c5adc7198450fa7a02858b3c9bd268f 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 "platform/MemoryCacheDumpProvider.h"
+#include "platform/MemoryCoordinator.h"
#include "public/platform/WebThread.h"
#include "wtf/Allocator.h"
#include "wtf/HashMap.h"
@@ -122,7 +123,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, public MemoryCacheDumpClient {
+class CORE_EXPORT MemoryCache final : public GarbageCollectedFinalized<MemoryCache>, public WebThread::TaskObserver, public MemoryCacheDumpClient, public MemoryCoordinatorClient {
USING_GARBAGE_COLLECTED_MIXIN(MemoryCache);
WTF_MAKE_NONCOPYABLE(MemoryCache);
public:
@@ -220,6 +221,8 @@ public:
// Take memory usage snapshot for tracing.
bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
+ void onMemoryPressure(WebMemoryPressureLevel) override;
+
bool isInSameLRUListForTest(const Resource*, const Resource*);
private:
enum PruneStrategy {

Powered by Google App Engine
This is Rietveld 408576698