Commit 3a18d0b7 authored by jww's avatar jww Committed by Commit bot

Interstitial options are not OR'd properly.

Instead of bitwise ORing the interstitial options, we were simply
assigning new values. This CL changes the assignment to a proper bitwise
OR so all options are maintained.

R=meacer@chromium.org,
TBR=jam@chromium.org,creis@chromium.org
BUG=415256

Review URL: https://codereview.chromium.org/578373002

Cr-Commit-Position: refs/heads/master@{#295807}
parent b3988855
......@@ -1712,11 +1712,11 @@ void ChromeContentBrowserClient::AllowCertificateError(
// ownership of ssl_blocking_page.
int options_mask = 0;
if (overridable)
options_mask = SSLBlockingPage::OVERRIDABLE;
options_mask |= SSLBlockingPage::OVERRIDABLE;
if (strict_enforcement)
options_mask = SSLBlockingPage::STRICT_ENFORCEMENT;
options_mask |= SSLBlockingPage::STRICT_ENFORCEMENT;
if (expired_previous_decision)
options_mask = SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED;
options_mask |= SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED;
SSLBlockingPage* ssl_blocking_page = new SSLBlockingPage(
tab, cert_error, ssl_info, request_url, options_mask, callback);
ssl_blocking_page->Show();
......
......@@ -76,9 +76,9 @@ SSLBlockingPage* CreateSSLBlockingPage(content::WebContents* web_contents) {
// This delegate doesn't create an interstitial.
int options_mask = 0;
if (overridable)
options_mask = SSLBlockingPage::OVERRIDABLE;
options_mask |= SSLBlockingPage::OVERRIDABLE;
if (strict_enforcement)
options_mask = SSLBlockingPage::STRICT_ENFORCEMENT;
options_mask |= SSLBlockingPage::STRICT_ENFORCEMENT;
return new SSLBlockingPage(web_contents,
cert_error,
ssl_info,
......
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