forked from GrapheneOS/Vanadium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0042-remove-safe-browsing-reporting-preference.patch
126 lines (121 loc) · 8.25 KB
/
0042-remove-safe-browsing-reporting-preference.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
From 56e9b72341cd0a9f46e13ac5dfc6605db0ed1a20 Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Fri, 2 Aug 2019 23:48:41 -0400
Subject: [PATCH 42/48] remove safe browsing reporting preference
---
.../res/xml/sync_and_services_preferences.xml | 10 +++----
.../sync/SyncAndServicesPreferences.java | 28 +++++++++----------
.../java/strings/android_chrome_strings.grd | 6 ----
3 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/chrome/android/java/res/xml/sync_and_services_preferences.xml b/chrome/android/java/res/xml/sync_and_services_preferences.xml
index 1c9d7ec0ffa6..758048990de8 100644
--- a/chrome/android/java/res/xml/sync_and_services_preferences.xml
+++ b/chrome/android/java/res/xml/sync_and_services_preferences.xml
@@ -61,11 +61,11 @@
android:title="@string/safe_browsing_title"
android:summary="@string/safe_browsing_summary"
android:persistent="false"/>
- <org.chromium.chrome.browser.preferences.ChromeSwitchPreferenceCompat
- android:key="safe_browsing_scout_reporting"
- android:title="@string/safe_browsing_scout_reporting_title"
- android:summary="@string/safe_browsing_scout_reporting_summary"
- android:persistent="false"/>
+ <!--<org.chromium.chrome.browser.preferences.ChromeSwitchPreferenceCompat-->
+ <!--android:key="safe_browsing_scout_reporting"-->
+ <!--android:title="@string/safe_browsing_scout_reporting_title"-->
+ <!--android:summary="@string/safe_browsing_scout_reporting_summary"-->
+ <!--android:persistent="false"/>-->
<org.chromium.chrome.browser.preferences.ChromeSwitchPreferenceCompat
android:key="usage_and_crash_reports"
android:title="@string/usage_and_crash_reports_title"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
index 62eb693c4fb9..1a2b2e18b8b5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/sync/SyncAndServicesPreferences.java
@@ -96,8 +96,8 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
//private static final String PREF_NAVIGATION_ERROR = "navigation_error";
private static final String PREF_SAFE_BROWSING = "safe_browsing";
- private static final String PREF_SAFE_BROWSING_SCOUT_REPORTING =
- "safe_browsing_scout_reporting";
+ //private static final String PREF_SAFE_BROWSING_SCOUT_REPORTING =
+ //"safe_browsing_scout_reporting";
private static final String PREF_USAGE_AND_CRASH_REPORTING = "usage_and_crash_reports";
private static final String PREF_URL_KEYED_ANONYMIZED_DATA = "url_keyed_anonymized_data";
private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
@@ -135,7 +135,7 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
private ChromeSwitchPreferenceCompat mSearchSuggestions;
//private ChromeSwitchPreferenceCompat mNavigationError;
private ChromeSwitchPreferenceCompat mSafeBrowsing;
- private ChromeSwitchPreferenceCompat mSafeBrowsingReporting;
+ //private ChromeSwitchPreferenceCompat mSafeBrowsingReporting;
private ChromeSwitchPreferenceCompat mUsageAndCrashReporting;
private ChromeSwitchPreferenceCompat mUrlKeyedAnonymizedData;
private @Nullable Preference mContextualSearch;
@@ -206,10 +206,10 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
mSafeBrowsing.setOnPreferenceChangeListener(this);
mSafeBrowsing.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
- mSafeBrowsingReporting =
- (ChromeSwitchPreferenceCompat) findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING);
- mSafeBrowsingReporting.setOnPreferenceChangeListener(this);
- mSafeBrowsingReporting.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
+ //mSafeBrowsingReporting =
+ //(ChromeSwitchPreferenceCompat) findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING);
+ //mSafeBrowsingReporting.setOnPreferenceChangeListener(this);
+ //mSafeBrowsingReporting.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
mUsageAndCrashReporting =
(ChromeSwitchPreferenceCompat) findPreference(PREF_USAGE_AND_CRASH_REPORTING);
@@ -331,8 +331,8 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
mPrefServiceBridge.setSearchSuggestEnabled((boolean) newValue);
} else if (PREF_SAFE_BROWSING.equals(key)) {
mPrefServiceBridge.setSafeBrowsingEnabled((boolean) newValue);
- } else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- mPrefServiceBridge.setSafeBrowsingExtendedReportingEnabled((boolean) newValue);
+ //} else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
+ //mPrefServiceBridge.setSafeBrowsingExtendedReportingEnabled((boolean) newValue);
//} else if (PREF_NAVIGATION_ERROR.equals(key)) {
//mPrefServiceBridge.setResolveNavigationErrorEnabled((boolean) newValue);
} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
@@ -509,8 +509,8 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
mSearchSuggestions.setChecked(mPrefServiceBridge.isSearchSuggestEnabled());
//mNavigationError.setChecked(mPrefServiceBridge.isResolveNavigationErrorEnabled());
mSafeBrowsing.setChecked(mPrefServiceBridge.isSafeBrowsingEnabled());
- mSafeBrowsingReporting.setChecked(
- mPrefServiceBridge.isSafeBrowsingExtendedReportingEnabled());
+ //mSafeBrowsingReporting.setChecked(
+ //mPrefServiceBridge.isSafeBrowsingExtendedReportingEnabled());
mUsageAndCrashReporting.setChecked(
mPrivacyPrefManager.isUsageAndCrashReportingPermittedByUser());
mUrlKeyedAnonymizedData.setChecked(
@@ -570,9 +570,9 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
return mPrefServiceBridge.isSearchSuggestManaged();
}
- if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- return mPrefServiceBridge.isSafeBrowsingExtendedReportingManaged();
- }
+ //if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
+ //return mPrefServiceBridge.isSafeBrowsingExtendedReportingManaged();
+ //}
if (PREF_SAFE_BROWSING.equals(key)) {
return mPrefServiceBridge.isSafeBrowsingManaged();
}
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
index f792846416da..8acc87d03667 100644
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -710,12 +710,6 @@ CHAR-LIMIT guidelines:
<message name="IDS_PREFS_PRIVACY" desc="Title for the Privacy preferences. [CHAR-LIMIT=32]">
Privacy
</message>
- <message name="IDS_SAFE_BROWSING_SCOUT_REPORTING_TITLE" desc="Title for checkbox that controls reporting data to detect bad apps/sites. Please ensure ‘Safe Browsing’ in this message matches the ‘Safe Browsing’ settings title.">
- Help improve Vanadium security
- </message>
- <message name="IDS_SAFE_BROWSING_SCOUT_REPORTING_SUMMARY" desc="Body text for Vanadium setting under 'Help Improve Safe Browsing'. This feature sends small amounts of data to Google about potentially-dangerous pages to help Safe Browsing improve Vanadium's protection against malware and phishing.">
- To detect dangerous apps and sites, Vanadium sends URLs of some pages you visit, limited system information, and some page content to Google
- </message>
<message name="IDS_SAFE_BROWSING_TITLE" desc="Title for safe browsing.">
Safe Browsing (protects you and your device from dangerous sites)
</message>
--
2.23.0