Description[Reading List] Check web state after the distillation delay.
It is possible that the web state has been released before the timeout
of the timer.
If this is the case, it means that the distillation was aborted.
Early return in that case.
There is no Cancelable delayed task. As the current situation is simple (only one
task is running at a time), store the ID of the task, and increment it when cancelling.
This is inspired by RunIfNotCanceled, but adapted to this much simpler situation.
Check the current ID when the task runs. If the ID was incremented, the task is cancelled.
BUG=695493
Review-Url: https://codereview.chromium.org/2717483003
Cr-Commit-Position: refs/heads/master@{#452540}
Committed: https://chromium.googlesource.com/chromium/src/+/d7e66510bedbf95d90337071155f8b07036cb002
Patch Set 1 #Patch Set 2 : add task_id #
Messages
Total messages: 12 (6 generated)
|