| Index: base/memory/memory_coordinator_proxy.cc
|
| diff --git a/base/memory/memory_coordinator_proxy.cc b/base/memory/memory_coordinator_proxy.cc
|
| index 24b6d66655e0e0d1cdaf59f89b7c2f2cb0c7458f..4b70472ff9a8fd5f3015ecb7a8cc4dc49d3076c2 100644
|
| --- a/base/memory/memory_coordinator_proxy.cc
|
| +++ b/base/memory/memory_coordinator_proxy.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "base/memory/memory_coordinator_proxy.h"
|
| +#include "base/process/process_metrics.h"
|
|
|
| namespace base {
|
|
|
| @@ -28,6 +29,13 @@ void MemoryCoordinatorProxy::SetCurrentMemoryStateForTesting(
|
| setter_callback_.Run(memory_state);
|
| }
|
|
|
| +
|
| +int64_t MemoryCoordinatorProxy::GetRemainingGlobalBudget() const {
|
| + if (!get_remaining_budget_callback_)
|
| + return 0;
|
| + return get_remaining_budget_callback_.Run();
|
| +}
|
| +
|
| void MemoryCoordinatorProxy::SetGetCurrentMemoryStateCallback(
|
| GetCurrentMemoryStateCallback callback) {
|
| getter_callback_ = callback;
|
| @@ -38,4 +46,9 @@ void MemoryCoordinatorProxy::SetSetCurrentMemoryStateForTestingCallback(
|
| setter_callback_ = callback;
|
| }
|
|
|
| +void MemoryCoordinatorProxy::SetGetRemainingGlobalBudgetCallback(
|
| + GetRemainingGlobalBudgetCallback get_remaining_budget_callback) {
|
| + get_remaining_budget_callback_ = get_remaining_budget_callback;
|
| +}
|
| +
|
| } // namespace base
|
|
|