| Index: base/memory/memory_coordinator_proxy.h
|
| diff --git a/base/memory/memory_coordinator_proxy.h b/base/memory/memory_coordinator_proxy.h
|
| index 2bb26c451c01c5a205ad5a1a795d60900ea263a5..53d443be5a1ff0cee2e34a87fa8df36004b56c42 100644
|
| --- a/base/memory/memory_coordinator_proxy.h
|
| +++ b/base/memory/memory_coordinator_proxy.h
|
| @@ -19,6 +19,8 @@ class BASE_EXPORT MemoryCoordinator {
|
| virtual ~MemoryCoordinator() {}
|
|
|
| virtual MemoryState GetCurrentMemoryState() const = 0;
|
| + virtual int64_t GetGlobalBudget() = 0;
|
| + virtual void SetGlobalBudgetUpdateInterval(uint32_t interval_ms) = 0;
|
| };
|
|
|
| // The proxy of MemoryCoordinator to be accessed from components that are not
|
| @@ -35,6 +37,17 @@ class BASE_EXPORT MemoryCoordinatorProxy {
|
| // Returns the current memory state.
|
| MemoryState GetCurrentMemoryState() const;
|
|
|
| + // Returns the current global memory budget. A negative value can be returned
|
| + // if the global budget is unknown or the system is under high memory
|
| + // pressure.
|
| + int64_t GetGlobalBudget() const;
|
| +
|
| + // TODO(bashi): Tentative.
|
| + void SetGlobalBudgetUpdateInterval(uint32_t interval_ms);
|
| +
|
| + // Returns true when an instance of MemoryCoordinator is set.
|
| + bool IsEnabled();
|
| +
|
| private:
|
| friend struct base::DefaultSingletonTraits<MemoryCoordinatorProxy>;
|
|
|
|
|