Skip to content

Commit

Permalink
check for empty content setting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Apr 23, 2020
1 parent 4ab7000 commit 2693980
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 2693980

Please sign in to comment.