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

Unified Diff: content/browser/renderer_host/renderer_frame_manager.cc

Issue 2675233003: Replace OnMemoryStateChange() with OnPurgeMemory() in RendererFrameManager (Closed)
Patch Set: Created 3 years, 10 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 | « content/browser/renderer_host/renderer_frame_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/renderer_frame_manager.cc
diff --git a/content/browser/renderer_host/renderer_frame_manager.cc b/content/browser/renderer_host/renderer_frame_manager.cc
index a05a92c3f59c595f9cec9808ebb7946e4001f4d5..7650e32f461dd911e8fcd90ffd62b0d41718f044 100644
--- a/content/browser/renderer_host/renderer_frame_manager.cc
+++ b/content/browser/renderer_host/renderer_frame_manager.cc
@@ -167,21 +167,8 @@ void RendererFrameManager::OnMemoryPressure(
}
}
-void RendererFrameManager::OnMemoryStateChange(base::MemoryState state) {
- switch (state) {
- case base::MemoryState::NORMAL:
- // It is not necessary to purge here.
- break;
- case base::MemoryState::THROTTLED:
- PurgeMemory(kCriticalPressurePercentage);
- break;
- case base::MemoryState::SUSPENDED:
- // Note that SUSPENDED never occurs in the main browser process so far.
- // Fall through.
- case base::MemoryState::UNKNOWN:
- NOTREACHED();
- break;
- }
+void RendererFrameManager::OnPurgeMemory() {
+ PurgeMemory(kCriticalPressurePercentage);
}
void RendererFrameManager::PurgeMemory(int percentage) {
« no previous file with comments | « content/browser/renderer_host/renderer_frame_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698