Loading predictor: Clean up preconnect requests that are done.

PreresolveInfo that are done earlier because their associated navigation
got cancelled may remain tracked in preconnect manager forever.
In general, this is not a big problem and only causes very small memory leaks.

However, with navigation predictor, a request for same URL
may arrive again after some time.
If the corresponding PreresolveInfo is not cleared, this newly arrived
request would not be honored by the PreconnectManager.

This CL ensures that if a PreresolveInfo is done, then it's
eventually removed from the list of tracked objects. This increases
the chances that a later-arriving preconnect request with
an identical URL would be dispatched to the network.

Change-Id: I887e367d8d8301e2db0b729ec0f0670368a63d77
Bug: 921720
Reviewed-on: https://chromium-review.googlesource.com/c/1416558
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623768}
2 files changed