DescriptionRefactor prerender pending swap logic.
Convert the timeout to a OneShotTimer. Also rearrange MaybeUsePrerenderedPage
and SwapInternal so the latter only does the swap while the former looks up the
PrerenderData. Move the merge and timeout callbacks into PendingData so we
don't need to pass in callbacks solely for the purpose of cancelling them.
This removes events PRERENDER_EVENT_MERGE_RESULT_TIMEOUT_CB and
RERENDER_EVENT_MERGE_RESULT_RESULT_CB as they were redundant with
TIMED_OUT and MERGE_DONE.
BUG=none
TEST=no behavior change; PrerenderBrowserTests.*
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239658
Patch Set 1 #Patch Set 2 : Remove DCHECKs (can fire with two successive loads in a row) #
Total comments: 10
Patch Set 3 : Move cleanup code #
Total comments: 7
Patch Set 4 : mmenke's comments #
Total comments: 2
Patch Set 5 : Pronouns #Patch Set 6 : I can order correctly words #
Messages
Total messages: 12 (0 generated)
|