Chromium Code Reviews| 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..b2bdb2134572f97a9c03fbb7f37067c980fdeaf4 100644 |
| --- a/third_party/WebKit/Source/platform/MemoryCoordinator.h |
| +++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h |
| @@ -45,6 +45,10 @@ 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. |
|
Yaron
2017/06/14 15:45:09
Please add a comment that this is not cheap and sh
keishi
2017/06/19 08:22:26
Done.
|
| + // 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 |