Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shields settings (uplift to 1.27.x) #9293

Merged
merged 1 commit into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,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