DescriptionEnsure we don't crash if user navigates back from NTP to Chrome sign-in page before it has fully loaded.
This CL aims to be simple, so it can be merged back to M29. It changes from DidStopLoading, which is later than needed point in time, to DidNavigateMainFrame. It is safe if we have committed a navigation to delete the previous navigation entry.
I've also added checks to ensure that we don't try to remove a pending navigation entry, as it leads to bugs, as evidenced here.
A follow up CL can completely remove the CurrentHistoryCleaner object, as all it does is store a single bit of state - the history entry index, and monitors for the same navigation events as OneClickSigninHelper.
BUG=257277
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213324
Patch Set 1 #
Total comments: 20
Patch Set 2 : Fixing the actual bug and cleaning up the test. #Patch Set 3 : Add test coverage for removing a pending entry. #
Total comments: 10
Patch Set 4 : Fixing nits. #
Total comments: 6
Patch Set 5 : Move from DidNavigate to DidCommitProvisionalLoad. #
Total comments: 4
Patch Set 6 : Fixing indent. #
Messages
Total messages: 16 (0 generated)
|