Skip to content

Commit

Permalink
Merge pull request #7549 from brave/ie_drop_fpv1
Browse files Browse the repository at this point in the history
13443: Drop fingerprinting V1 shields settings.
  • Loading branch information
bsclifton authored and mkarolin committed Jan 12, 2021
1 parent aed75a9 commit eb7a674
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/brave_shields/common/brave_shield_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const char kLinkedInEmbeds[] = "linked-in-embeds";
const char kObsoleteAds[] = "ads";
const char kObsoleteCookies[] = "cookies";

// Some users were not properly migrated from fingerprinting V1.
const char kObsoleteFingerprinting[] = "fingerprinting";

} // namespace brave_shields

#endif // BRAVE_COMPONENTS_BRAVE_SHIELDS_COMMON_BRAVE_SHIELD_CONSTANTS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ void BravePrefProvider::MigrateShieldsSettingsFromResourceIds() {
for (base::DictionaryValue::Iterator j(*resource_dictionary);
!j.IsAtEnd(); j.Advance()) {
const std::string& resource_identifier(j.key());

if (resource_identifier == brave_shields::kObsoleteFingerprinting) {
// Just drop, because these preferences were not effective anyway.
continue;
}

// Drop a "global" value of brave shields, that actually shouldn't exist
// at all since we don't have any global toggle for this.
if (resource_identifier == brave_shields::kBraveShields &&
patterns_string == "*,*") {
continue;
}

int setting = CONTENT_SETTING_DEFAULT;
bool is_integer = j.value().GetAsInteger(&setting);
DCHECK(is_integer);
Expand Down

0 comments on commit eb7a674

Please sign in to comment.