Index: chrome/browser/memory/tab_manager.cc |
diff --git a/chrome/browser/memory/tab_manager.cc b/chrome/browser/memory/tab_manager.cc |
index a2299862de6deec44a10eb2a4db511c985a7d215..1c64eccf2d91db2943a0410efeec80ab74d86b40 100644 |
--- a/chrome/browser/memory/tab_manager.cc |
+++ b/chrome/browser/memory/tab_manager.cc |
@@ -70,10 +70,12 @@ namespace { |
// value. |
const int kAdjustmentIntervalSeconds = 10; |
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
// For each period of this length record a statistic to indicate whether or not |
// the user experienced a low memory event. If this interval is changed, |
// Tabs.Discard.DiscardInLastMinute must be replaced with a new statistic. |
const int kRecentTabDiscardIntervalSeconds = 60; |
+#endif |
// If there has been no priority adjustment in this interval, assume the |
// machine was suspended and correct the timing statistics. |
@@ -197,6 +199,10 @@ void TabManager::Start() { |
TimeDelta::FromSeconds(kAdjustmentIntervalSeconds), |
this, &TabManager::UpdateTimerCallback); |
} |
+ |
+ // MemoryPressureMonitor is not implemented on Linux so far and tabs are never |
+ // discarded. |
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
if (!recent_tab_discard_timer_.IsRunning()) { |
recent_tab_discard_timer_.Start( |
FROM_HERE, TimeDelta::FromSeconds(kRecentTabDiscardIntervalSeconds), |
@@ -214,6 +220,7 @@ void TabManager::Start() { |
OnMemoryPressure(level); |
} |
} |
+#endif |
} |
void TabManager::Stop() { |