Commit 26fa08e3 authored by Eric Orth's avatar Eric Orth Committed by Commit Bot

Remove legacy API tests for HostResolver.

Also:
*Update deprecation comments on legacy API methods now that they are
 untested.
*Added a new-API test for changing priority. Support was added a while
 back, but I must've forgotten to add a test.
*Some minor TODO cleanups for tests that already exist.

Will not commit this until confirming all non-test usage of the legacy
API is gone (should just be waiting for crrev.com/c/1446780 to land).

Bug: 922699
Change-Id: Ia5afe66883baaf3b321f3195e1fd4ff109e00ddf
Reviewed-on: https://chromium-review.googlesource.com/c/1479750Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Commit-Queue: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634455}
parent 69fae80a
...@@ -330,30 +330,8 @@ class NET_EXPORT HostResolver { ...@@ -330,30 +330,8 @@ class NET_EXPORT HostResolver {
const NetLogWithSource& net_log, const NetLogWithSource& net_log,
const base::Optional<ResolveHostParameters>& optional_parameters) = 0; const base::Optional<ResolveHostParameters>& optional_parameters) = 0;
// DEPRECATION NOTE: This method is being replaced by CreateRequest(). New // DO NOT USE. This is a no-longer-tested legacy method that will soon be
// callers should prefer CreateRequest() if it works for their needs. // deleted.
//
// Resolves the given hostname (or IP address literal), filling out the
// |addresses| object upon success. The |info.port| parameter will be set as
// the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if
// successful or an error code upon failure. Returns
// ERR_NAME_NOT_RESOLVED if hostname is invalid, or if it is an
// incompatible IP literal (e.g. IPv6 is disabled and it is an IPv6
// literal).
//
// If the operation cannot be completed synchronously, ERR_IO_PENDING will
// be returned and the real result code will be passed to the completion
// callback. Otherwise the result code is returned immediately from this
// call.
//
// [out_req] must be owned by a caller. If the request is not completed
// synchronously, it will be filled with a handle to the request. It must be
// completed before the HostResolver itself is destroyed.
//
// Requests can be cancelled any time by deletion of the [out_req]. Deleting
// |out_req| will cancel the request, and cause |callback| not to be invoked.
//
// Profiling information for the request is saved to |net_log| if non-NULL.
// //
// TODO(crbug.com/922699): Delete this method once all usage has been // TODO(crbug.com/922699): Delete this method once all usage has been
// converted to CreateRequest(). // converted to CreateRequest().
...@@ -364,16 +342,8 @@ class NET_EXPORT HostResolver { ...@@ -364,16 +342,8 @@ class NET_EXPORT HostResolver {
std::unique_ptr<Request>* out_req, std::unique_ptr<Request>* out_req,
const NetLogWithSource& net_log) = 0; const NetLogWithSource& net_log) = 0;
// DEPRECATION NOTE: This method is being replaced by CreateRequest(). New // DO NOT USE. This is a no-longer-tested legacy method that will soon be
// callers should prefer CreateRequest() if it works for their needs. Calling // deleted.
// CreateRequest() with
// |parameters.source = HostResolverSource::LOCAL_ONLY| should provide
// capabilities equivalent to ResolveFromCache().
//
// Resolves the given hostname (or IP address literal) out of cache or HOSTS
// file (if enabled) only. This is guaranteed to complete synchronously.
// This acts like |Resolve()| if the hostname is IP literal, or cached value
// or HOSTS entry exists. Otherwise, ERR_DNS_CACHE_MISS is returned.
// //
// TODO(crbug.com/922699): Delete this method once all usage has been // TODO(crbug.com/922699): Delete this method once all usage has been
// converted to CreateRequest(). // converted to CreateRequest().
...@@ -381,16 +351,8 @@ class NET_EXPORT HostResolver { ...@@ -381,16 +351,8 @@ class NET_EXPORT HostResolver {
AddressList* addresses, AddressList* addresses,
const NetLogWithSource& net_log) = 0; const NetLogWithSource& net_log) = 0;
// DEPRECATION NOTE: This method is being replaced by CreateRequest(). New // DO NOT USE. This is a no-longer-tested legacy method that will soon be
// callers should prefer CreateRequest() if it works for their needs. Calling // deleted.
// CreateRequest() with
// |parameters.source = HostResolverSource::LOCAL_ONLY| and
// |parameters.cache_usage = ResolveHostParameters::CacheUsage::STALE_ALLOWED|
// should provide capabilities equivalent to ResolveStaleFromCache()
//
// Like |ResolveFromCache()|, but can return a stale result if the
// implementation supports it. Fills in |*stale_info| if a response is
// returned to indicate how stale (or not) it is.
// //
// TODO(crbug.com/922699): Delete this method once all usage has been // TODO(crbug.com/922699): Delete this method once all usage has been
// converted to CreateRequest(). // converted to CreateRequest().
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment