Chromium Code Reviews| Index: chrome/browser/resource_coordinator/tab_manager.cc |
| diff --git a/chrome/browser/resource_coordinator/tab_manager.cc b/chrome/browser/resource_coordinator/tab_manager.cc |
| index 208ab52cd2b9982ad6ece62ea7bd7b8a0f0bacd9..3601c9f9c2b81e0f2d4d9574c7be0881caef20bf 100644 |
| --- a/chrome/browser/resource_coordinator/tab_manager.cc |
| +++ b/chrome/browser/resource_coordinator/tab_manager.cc |
| @@ -112,6 +112,7 @@ TabManager::TabManager() |
| browser_tab_strip_tracker_(this, nullptr, nullptr), |
| test_tick_clock_(nullptr), |
| in_session_restore_(false), |
| + initial_active_tab_changed_(false), |
| weak_ptr_factory_(this) { |
| #if defined(OS_CHROMEOS) |
| delegate_.reset(new TabManagerDelegate(weak_ptr_factory_.GetWeakPtr())); |
| @@ -793,6 +794,10 @@ void TabManager::ActiveTabChanged(content::WebContents* old_contents, |
| GetWebContentsData(old_contents) |
| ->set_time_to_purge(GetTimeToPurge(min_time_to_purge_)); |
| } |
| + |
| + if (old_contents && !initial_active_tab_changed_) { |
| + initial_active_tab_changed_ = true; |
|
chrisha
2017/06/21 15:00:26
This logic seems frail. If this is specifically ti
ducbui
2017/06/27 19:41:24
Acknowledged. I reset the flag for each session re
|
| + } |
| } |
| void TabManager::TabInsertedAt(TabStripModel* tab_strip_model, |