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

Unified Diff: base/memory/memory_coordinator_proxy.cc

Issue 2731913002: NotForReview: Expose the global memory budget (chromium side)
Patch Set: Add --simulate-memory-pressure Created 3 years, 9 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 | « base/memory/memory_coordinator_proxy.h ('k') | content/browser/memory/memory_condition_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_coordinator_proxy.cc
diff --git a/base/memory/memory_coordinator_proxy.cc b/base/memory/memory_coordinator_proxy.cc
index f82e928a4b59353f595cf5e1dbc716df6f94dde1..88555955a2cd47e85b998f2de17288665cdf2e88 100644
--- a/base/memory/memory_coordinator_proxy.cc
+++ b/base/memory/memory_coordinator_proxy.cc
@@ -36,4 +36,21 @@ MemoryState MemoryCoordinatorProxy::GetCurrentMemoryState() const {
return g_memory_coordinator->GetCurrentMemoryState();
}
+int64_t MemoryCoordinatorProxy::GetGlobalBudget() const {
+ if (!g_memory_coordinator)
+ return -1;
+ return g_memory_coordinator->GetGlobalBudget();
+}
+
+void MemoryCoordinatorProxy::SetGlobalBudgetUpdateInterval(
+ uint32_t interval_ms) {
+ if (!g_memory_coordinator)
+ return;
+ g_memory_coordinator->SetGlobalBudgetUpdateInterval(interval_ms);
+}
+
+bool MemoryCoordinatorProxy::IsEnabled() {
+ return g_memory_coordinator != nullptr;
+}
+
} // namespace base
« no previous file with comments | « base/memory/memory_coordinator_proxy.h ('k') | content/browser/memory/memory_condition_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698