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

Unified Diff: cc/resources/resource_pool.cc

Issue 2648323005: memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() (Closed)
Patch Set: Created 3 years, 11 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
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 61a7ae3f9fdc6519376a1b473631a73bc7cd3d40..c2003758c4ba65ef0348e1988699c79f41dfb1b6 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -480,23 +480,9 @@ bool ResourcePool::OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
return true;
}
-void ResourcePool::OnMemoryStateChange(base::MemoryState state) {
- switch (state) {
- case base::MemoryState::NORMAL:
- // TODO(tasak): go back to normal state.
- break;
- case base::MemoryState::THROTTLED:
- // TODO(tasak): make the limits of this component's caches smaller to
- // save memory usage.
- break;
- case base::MemoryState::SUSPENDED:
- // Release all resources, regardless of how recently they were used.
- EvictResourcesNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
- break;
- case base::MemoryState::UNKNOWN:
- // NOT_REACHED.
- break;
- }
+void ResourcePool::OnPurgeMemory() {
+ // Release all resources, regardless of how recently they were used.
+ EvictResourcesNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698