Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Issue 2762363002: Do not use GetPendingEntryIndex in TabRestoreServiceHelper::PopulateTab. (Closed)

Created:
3 years, 9 months ago by Eugene But (OOO till 7-30)
Modified:
3 years, 9 months ago
Reviewers:
Charlie Reis, sky
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not use GetPendingEntryIndex in TabRestoreServiceHelper::PopulateTab. TabRestoreServiceHelper::PopulateTab never restores pending item and there is no need to call GetPendingEntryIndex. This CL removes dead code and does not change the app behavior. Specifically |(entry_count == 0 && pending_index == 0)| can never be true, because if entry_count is 0, the pending_index is always -1. Also live_tab->GetEntryAtIndex(i) always return correct value even it is a pending entry. BUG=None Review-Url: https://codereview.chromium.org/2762363002 Cr-Commit-Position: refs/heads/master@{#459481} Committed: https://chromium.googlesource.com/chromium/src/+/00544941366aa3b491b9f134b8c4f6b8c2ea880f

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -6 lines) Patch
M components/sessions/core/tab_restore_service_helper.cc View 1 chunk +1 line, -6 lines 6 comments Download

Messages

Total messages: 23 (13 generated)
Eugene But (OOO till 7-30)
Hi Scott, You listed as an owner for components/sessions, so I thought that you would ...
3 years, 9 months ago (2017-03-21 22:31:15 UTC) #6
sky
https://codereview.chromium.org/2762363002/diff/1/components/sessions/core/tab_restore_service_helper.cc File components/sessions/core/tab_restore_service_helper.cc (right): https://codereview.chromium.org/2762363002/diff/1/components/sessions/core/tab_restore_service_helper.cc#newcode417 components/sessions/core/tab_restore_service_helper.cc:417: SerializedNavigationEntry entry = live_tab->GetEntryAtIndex(i); On 2017/03/21 22:31:15, Eugene But ...
3 years, 9 months ago (2017-03-22 03:20:16 UTC) #7
Eugene But (OOO till 7-30)
Charlie, do you think my change in this CL is sane and does not change ...
3 years, 9 months ago (2017-03-22 14:38:40 UTC) #9
Charlie Reis
LGTM. sky@, do you agree with the reasoning below? (I can't think of a case ...
3 years, 9 months ago (2017-03-22 22:49:49 UTC) #10
sky
Indeed. LGTM
3 years, 9 months ago (2017-03-22 23:49:50 UTC) #11
Eugene But (OOO till 7-30)
Thank you! I've updated CL description as initially this CL was only for discussion, not ...
3 years, 9 months ago (2017-03-23 18:27:41 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2762363002/1
3 years, 9 months ago (2017-03-23 18:28:31 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/413483)
3 years, 9 months ago (2017-03-23 19:03:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2762363002/1
3 years, 9 months ago (2017-03-24 17:42:51 UTC) #20
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 18:26:00 UTC) #23
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/00544941366aa3b491b9f134b8c4...

Powered by Google App Engine
This is Rietveld 408576698