Chromium Code Reviews| Index: components/sessions/core/tab_restore_service_helper.cc |
| diff --git a/components/sessions/core/tab_restore_service_helper.cc b/components/sessions/core/tab_restore_service_helper.cc |
| index f4f111975bc8daabfb164e3953dcbd4cc415a35c..e792dd6b67f9fd726f6b013b37e7130b39c4343c 100644 |
| --- a/components/sessions/core/tab_restore_service_helper.cc |
| +++ b/components/sessions/core/tab_restore_service_helper.cc |
| @@ -410,16 +410,11 @@ void TabRestoreServiceHelper::PopulateTab(Tab* tab, |
| int index, |
| LiveTabContext* context, |
| LiveTab* live_tab) { |
| - const int pending_index = live_tab->GetPendingEntryIndex(); |
| int entry_count = |
| live_tab->IsInitialBlankNavigation() ? 0 : live_tab->GetEntryCount(); |
| - if (entry_count == 0 && pending_index == 0) |
|
Eugene But (OOO till 7-30)
2017/03/21 22:31:14
When entry_count is 0, then pending_index is alway
Charlie Reis
2017/03/22 22:49:49
Yes, I can't think of a case that both entry_count
|
| - entry_count++; |
| tab->navigations.resize(static_cast<int>(entry_count)); |
| for (int i = 0; i < entry_count; ++i) { |
| - SerializedNavigationEntry entry = (i == pending_index) |
| - ? live_tab->GetPendingEntry() |
| - : live_tab->GetEntryAtIndex(i); |
| + SerializedNavigationEntry entry = live_tab->GetEntryAtIndex(i); |
|
Eugene But (OOO till 7-30)
2017/03/21 22:31:15
Because |entry_count| does not include pending ite
sky
2017/03/22 03:20:16
Are you sure about that? I thought reload and poss
Eugene But (OOO till 7-30)
2017/03/22 14:38:40
It is true that reload and back-forward navigation
Charlie Reis
2017/03/22 22:49:49
Yeah, pointing to an existing one is fine-- your C
|
| tab->navigations[i] = entry; |
| } |
| tab->timestamp = TimeNow(); |