diff --git a/chrome/browser/ssl/https_upgrades_util.cc b/chrome/browser/ssl/https_upgrades_util.cc index ee5c21622922f5033688f91a4bf4844580f36322..71fd6b1072f06c0b3f0cbdfac06db0c18b057d27 100644 --- a/chrome/browser/ssl/https_upgrades_util.cc +++ b/chrome/browser/ssl/https_upgrades_util.cc @@ -71,11 +71,11 @@ ComputeInterstitialState(content::WebContents* web_contents, const GURL& url) { security_interstitials::https_only_mode::HttpInterstitialState interstitial_state; interstitial_state.enabled_by_pref = - prefs && prefs->GetBoolean(prefs::kHttpsOnlyModeEnabled); + prefs && prefs->GetBooleanOr(prefs::kHttpsOnlyModeEnabled, NormalWindowHttpsOnly(url, profile)); if (base::FeatureList::IsEnabled(features::kHttpsFirstModeIncognito)) { if (profile->IsIncognitoProfile() && prefs && - prefs->GetBoolean(prefs::kHttpsFirstModeIncognito)) { + prefs->GetBooleanOr(prefs::kHttpsFirstModeIncognito, NormalWindowHttpsOnly(url, profile))) { interstitial_state.enabled_by_incognito = true; } }