| Index: chrome/browser/sessions/tab_loader.cc
|
| diff --git a/chrome/browser/sessions/tab_loader.cc b/chrome/browser/sessions/tab_loader.cc
|
| index bf1b00a0258d2b777399dc95c5984891bc02b319..bee50bcb8f00619a1a9ece6498a876866ef3f4b9 100644
|
| --- a/chrome/browser/sessions/tab_loader.cc
|
| +++ b/chrome/browser/sessions/tab_loader.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/metrics/histogram.h"
|
| #include "base/strings/stringprintf.h"
|
| +#include "chrome/browser/sessions/session_restore_stats_collector.h"
|
| #include "chrome/browser/ui/browser.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| #include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| @@ -214,9 +215,17 @@ void TabLoader::OnMemoryPressure(
|
| // Stop the timer and suppress any tab loads while we clean the list.
|
| SetTabLoadingEnabled(false);
|
| while (!tabs_to_load_.empty()) {
|
| - NavigationController* controller = tabs_to_load_.front();
|
| + NavigationController* tab = tabs_to_load_.front();
|
| tabs_to_load_.pop_front();
|
| - RemoveTab(controller);
|
| + RemoveTab(tab);
|
| +
|
| + // Notify the stats collector that a tab's loading has been deferred due to
|
| + // memory pressure. It's possible for the stats collector to infer this on
|
| + // its own, but not in the presence of the above experiment, hence this is
|
| + // explicitly called.
|
| + // TODO(chrisha): Re-evaluate this was the memory-pressure experiment is
|
| + // finished.
|
| + SessionRestoreStatsCollector::DeferTab(tab);
|
| }
|
| // By calling |LoadNextTab| explicitly, we make sure that the
|
| // |NOTIFICATION_SESSION_RESTORE_DONE| event gets sent.
|
|
|