commit | 2a27db26ffb757606b7e5b8a004c8134861fc175 | [log] [tgz] |
---|---|---|
author | Eric Orth <ericorth@chromium.org> | Wed Feb 06 16:24:43 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Feb 06 16:24:43 2019 |
tree | d647f209fad6c33e60c35402cfc2af134bc0df2b | |
parent | 190592543c43d8bf73d88bd679c4938f035a8c80 [diff] |
Rewrite StaleHostResolver around CreateRequest() API Motivation is that HostResolver::Resolve() is soon to be deleted and all usage converted to CreateRequest (or to network service APIs). Need to ensure cronet/StaleHostResolver continue working during transition. Fully implemented StaleHostResolver::CreateRequest(). StaleHostResolver::Resolve() now implemented using CreateRequest() and HostResolver::ResolveLegacy(). As the new API is more focused on the ResolveHostRequest object, it made more sense to convert the StaleHostResolver::RequestImpl to be a direct implementation, rather than using a separate Handle. Main difference is lifetime semantics. The object is now owned by the client instead of self-destroying on completion. Extra orphaned requests (allowed to complete to backfill the cache) are then detached to be owned by StaleHostResolver instance itself as the client will likely destroy the request after getting results. With added weak ptr back to StaleHostResolver, it became simpler to have RequestImpl directly read options_ and implement the stale usable checks rather than pass in a callback. Bug: 922699 Change-Id: Iadb48c0d574cc47ff6f79a6d313164b126c1d76d Reviewed-on: https://chromium-review.googlesource.com/c/1452699 Reviewed-by: Paul Jensen <pauljensen@chromium.org> Commit-Queue: Eric Orth <ericorth@chromium.org> Cr-Commit-Position: refs/heads/master@{#629601}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .