Commit 2a31a15e authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Use static_cast instead of reinterpret_cast for downcasting

static_cast is better suited for downcasting since it can check that the
types are related.

/components/cronet
This CL was uploaded by git cl split.

R=ericorth@chromium.org

Change-Id: I4d485c7b43cdc9a755112f093e691f6077b13bdb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435753
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: default avatarEric Orth <ericorth@chromium.org>
Commit-Queue: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811301}
parent 4709e69c
...@@ -705,7 +705,7 @@ TEST_F(StaleHostResolverTest, CreatedByContext) { ...@@ -705,7 +705,7 @@ TEST_F(StaleHostResolverTest, CreatedByContext) {
std::unique_ptr<net::URLRequestContext> context(builder.Build()); std::unique_ptr<net::URLRequestContext> context(builder.Build());
// Experimental options ensure context's resolver is a StaleHostResolver. // Experimental options ensure context's resolver is a StaleHostResolver.
SetResolver(reinterpret_cast<StaleHostResolver*>(context->host_resolver()), SetResolver(static_cast<StaleHostResolver*>(context->host_resolver()),
context.get()); context.get());
// Note: Experimental config above sets 0ms stale delay. // Note: Experimental config above sets 0ms stale delay.
CreateCacheEntry(kAgeExpiredSec, net::OK); CreateCacheEntry(kAgeExpiredSec, net::OK);
......
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