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

Unified Diff: third_party/WebKit/Source/platform/MemoryCoordinator.h

Issue 2933503002: Add IsCurrentlyLowMemory (Closed)
Patch Set: added comment Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/platform/DEPS ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/MemoryCoordinator.h
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.h b/third_party/WebKit/Source/platform/MemoryCoordinator.h
index c8e137b01507cb8905aa481c3084201cb5ad6995..3149524763d6eea867d4e8707878392c7f7f92b5 100644
--- a/third_party/WebKit/Source/platform/MemoryCoordinator.h
+++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h
@@ -45,6 +45,11 @@ class PLATFORM_EXPORT MemoryCoordinator final
// Override the value of the physical memory for testing.
static void SetPhysicalMemoryMBForTesting(int64_t);
+ // Returns true when available memory is low.
+ // This is not cheap and should not be called repeatedly.
+ // TODO(keishi): Remove when MemoryState is ready.
+ static bool IsCurrentlyLowMemory();
+
// Caches whether this device is a low-end device and the device physical
// memory in static members. instance() is not used as it's a heap allocated
// object - meaning it's not thread-safe as well as might break tests counting
« no previous file with comments | « third_party/WebKit/Source/platform/DEPS ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698