Skip to content

Commit

Permalink
Merge pull request #5341 from brave/farbling-content-setting-fix
Browse files Browse the repository at this point in the history
check for empty content setting rules
  • Loading branch information
bridiver authored Apr 23, 2020
2 parents 515a277 + 2693980 commit 44e12d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions renderer/brave_content_settings_agent_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ ContentSetting GetBraveContentSettingFromRules(
return rule.GetContentSetting();
}
}
NOTREACHED();
return CONTENT_SETTING_DEFAULT;
}

Expand Down Expand Up @@ -276,9 +275,13 @@ bool BraveContentSettingsAgentImpl::AllowFingerprinting(

BraveFarblingLevel BraveContentSettingsAgentImpl::GetBraveFarblingLevel() {
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
ContentSetting setting = GetBraveContentSettingFromRules(

ContentSetting setting = CONTENT_SETTING_DEFAULT;
if (content_setting_rules_) {
setting = GetBraveContentSettingFromRules(
content_setting_rules_->fingerprinting_rules, frame,
url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL());
}

if (base::FeatureList::IsEnabled(
brave_shields::features::kFingerprintingProtectionV2)) {
Expand Down

0 comments on commit 44e12d7

Please sign in to comment.