Chromium Code Reviews| 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..4aec020bae6cd920879149c537627166055cc872 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_LINUX) |
|
sky
2016/04/21 16:59:18
In this file don't you want this to run for chrome
hajimehoshi
2016/04/22 08:05:48
Done.
|
| // 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_LINUX) |
| 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() { |