Commit 55c6a3a8 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.

/chrome/browser/ssl
This CL was uploaded by git cl split.

R=estark@chromium.org

Change-Id: Ifc807a2bc88c612e3099ec92c5a14d693a2fccb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435581
Auto-Submit: Kevin McNee <mcnee@chromium.org>
Reviewed-by: default avatarEmily Stark <estark@chromium.org>
Commit-Queue: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811599}
parent f28f6569
...@@ -4410,7 +4410,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, BadCertFollowedByGoodCert) { ...@@ -4410,7 +4410,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, BadCertFollowedByGoodCert) {
Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
StatefulSSLHostStateDelegate* state = StatefulSSLHostStateDelegate* state =
reinterpret_cast<StatefulSSLHostStateDelegate*>( static_cast<StatefulSSLHostStateDelegate*>(
profile->GetSSLHostStateDelegate()); profile->GetSSLHostStateDelegate());
// First check that frame requests revoke the decision. // First check that frame requests revoke the decision.
...@@ -4457,7 +4457,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, BadCertFollowedByBlobUrl) { ...@@ -4457,7 +4457,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, BadCertFollowedByBlobUrl) {
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext()); Profile* profile = Profile::FromBrowserContext(tab->GetBrowserContext());
StatefulSSLHostStateDelegate* state = StatefulSSLHostStateDelegate* state =
reinterpret_cast<StatefulSSLHostStateDelegate*>( static_cast<StatefulSSLHostStateDelegate*>(
profile->GetSSLHostStateDelegate()); profile->GetSSLHostStateDelegate());
// Proceed through the interstitial, accepting the broken cert. // Proceed through the interstitial, accepting the broken cert.
...@@ -8132,7 +8132,7 @@ IN_PROC_BROWSER_TEST_F(RecurrentInterstitialBrowserTest, ...@@ -8132,7 +8132,7 @@ IN_PROC_BROWSER_TEST_F(RecurrentInterstitialBrowserTest,
net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED); net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED);
StatefulSSLHostStateDelegate* state = StatefulSSLHostStateDelegate* state =
reinterpret_cast<StatefulSSLHostStateDelegate*>( static_cast<StatefulSSLHostStateDelegate*>(
browser()->profile()->GetSSLHostStateDelegate()); browser()->profile()->GetSSLHostStateDelegate());
state->ResetRecurrentErrorCountForTesting(); state->ResetRecurrentErrorCountForTesting();
......
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