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

Unified Diff: chrome/browser/memory/tab_manager.cc

Issue 2735993002: memory_coordinator: Discard tabs under critical memory condition (Closed)
Patch Set: 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
Index: chrome/browser/memory/tab_manager.cc
diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc
index b689350325b807a0276cac709e4e4fa3d2054980..69001b94fe9e4826add60f039c60bf50b5675fad 100644
--- a/chrome/browser/memory/tab_manager.cc
+++ b/chrome/browser/memory/tab_manager.cc
@@ -350,15 +350,15 @@ bool TabManager::CanDiscardTab(int64_t target_web_contents_id) const {
return true;
}
-void TabManager::DiscardTab() {
+bool TabManager::DiscardTab() {
#if defined(OS_CHROMEOS)
// Call Chrome OS specific low memory handling process.
if (base::FeatureList::IsEnabled(features::kArcMemoryManagement)) {
delegate_->LowMemoryKill(GetUnsortedTabStats());
- return;
+ return false;
}
#endif
- DiscardTabImpl();
+ return DiscardTabImpl() != nullptr;
}
WebContents* TabManager::DiscardTabById(int64_t target_web_contents_id) {

Powered by Google App Engine
This is Rietveld 408576698