Skip to content

Commit

Permalink
Merge pull request #9240 from brave/add-shields-settings
Browse files Browse the repository at this point in the history
Add shields settings
  • Loading branch information
alexsafe committed Jun 29, 2021
2 parents 6ecfaa3 + 813ed68 commit fdd7cbc
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ private void checkForYandexSE() {
private void checkForNotificationData() {
Intent notifIntent = getIntent();
if (notifIntent != null && notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE) != null) {
Log.e("NTP", notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE));
String notificationType = notifIntent.getStringExtra(RetentionNotificationUtil.NOTIFICATION_TYPE);
switch (notificationType) {
case RetentionNotificationUtil.HOUR_3:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public static void setShieldsValue(Profile profile, String host, String resource
BraveShieldsContentSettingsJni.get().setFingerprintingControlType(settingOption, host, profile);
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_COOKIES)) {
BraveShieldsContentSettingsJni.get().setCookieControlType(settingOption, host, profile);
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_TRACKERS)) {
BraveShieldsContentSettingsJni.get().setCosmeticFilteringControlType(
settingOption, host, profile);
}
}

Expand All @@ -119,6 +122,9 @@ public static String getShieldsValue(Profile profile, String host, String resour
settings = BraveShieldsContentSettingsJni.get().getFingerprintingControlType(host, profile);
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_COOKIES)) {
settings = BraveShieldsContentSettingsJni.get().getCookieControlType(host, profile);
} else if (resourceIndentifier.equals(RESOURCE_IDENTIFIER_TRACKERS)) {
settings = BraveShieldsContentSettingsJni.get().getCosmeticFilteringControlType(
host, profile);
}
return settings;
}
Expand Down Expand Up @@ -160,5 +166,8 @@ interface Natives {
boolean getHTTPSEverywhereEnabled(String url, Profile profile);
void setNoScriptControlType(String type, String url, Profile profile);
String getNoScriptControlType(String url, Profile profile);

void setCosmeticFilteringControlType(String type, String url, Profile profile);
String getCosmeticFilteringControlType(String url, Profile profile);
}
}
Loading

0 comments on commit fdd7cbc

Please sign in to comment.