forked from GrapheneOS/Vanadium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0044-remove-url-keyed-anonymized-data-preference.patch
132 lines (124 loc) · 8.6 KB
/
0044-remove-url-keyed-anonymized-data-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
126
127
128
129
130
131
From 216e5773f4c610a0be1333f37b1637136700c4d6 Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Fri, 2 Aug 2019 23:50:03 -0400
Subject: [PATCH 44/48] remove url keyed anonymized data preference
---
.../res/xml/sync_and_services_preferences.xml | 10 +++----
.../sync/SyncAndServicesPreferences.java | 28 +++++++++----------
.../java/strings/android_chrome_strings.grd | 12 ++++----
3 files changed, 25 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 0db6d74d99bf..d3b920e274ab 100644
--- a/chrome/android/java/res/xml/sync_and_services_preferences.xml
+++ b/chrome/android/java/res/xml/sync_and_services_preferences.xml
@@ -71,11 +71,11 @@
<!--android:title="@string/usage_and_crash_reports_title"-->
<!--android:summary="@string/usage_and_crash_reports_summary"-->
<!--android:persistent="false"/>-->
- <org.chromium.chrome.browser.preferences.ChromeSwitchPreferenceCompat
- android:key="url_keyed_anonymized_data"
- android:title="@string/url_keyed_anonymized_data_title"
- android:summary="@string/url_keyed_anonymized_data_summary"
- android:persistent="false"/>
+ <!--<org.chromium.chrome.browser.preferences.ChromeSwitchPreferenceCompat-->
+ <!--android:key="url_keyed_anonymized_data"-->
+ <!--android:title="@string/url_keyed_anonymized_data_title"-->
+ <!--android:summary="@string/url_keyed_anonymized_data_summary"-->
+ <!--android:persistent="false"/>-->
<org.chromium.chrome.browser.preferences.ChromeBasePreferenceCompat
android:key="contextual_search"
android:title="@string/contextual_search_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 43b103cc92ca..432f4c1e6a59 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
@@ -99,7 +99,7 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
//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_URL_KEYED_ANONYMIZED_DATA = "url_keyed_anonymized_data";
private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
@IntDef({SyncError.NO_ERROR, SyncError.ANDROID_SYNC_DISABLED, SyncError.AUTH_ERROR,
@@ -137,7 +137,7 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
private ChromeSwitchPreferenceCompat mSafeBrowsing;
//private ChromeSwitchPreferenceCompat mSafeBrowsingReporting;
//private ChromeSwitchPreferenceCompat mUsageAndCrashReporting;
- private ChromeSwitchPreferenceCompat mUrlKeyedAnonymizedData;
+ //private ChromeSwitchPreferenceCompat mUrlKeyedAnonymizedData;
private @Nullable Preference mContextualSearch;
private ProfileSyncService.SyncSetupInProgressHandle mSyncSetupInProgressHandle;
@@ -216,10 +216,10 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
//mUsageAndCrashReporting.setOnPreferenceChangeListener(this);
//mUsageAndCrashReporting.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
- mUrlKeyedAnonymizedData =
- (ChromeSwitchPreferenceCompat) findPreference(PREF_URL_KEYED_ANONYMIZED_DATA);
- mUrlKeyedAnonymizedData.setOnPreferenceChangeListener(this);
- mUrlKeyedAnonymizedData.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
+ //mUrlKeyedAnonymizedData =
+ //(ChromeSwitchPreferenceCompat) findPreference(PREF_URL_KEYED_ANONYMIZED_DATA);
+ //mUrlKeyedAnonymizedData.setOnPreferenceChangeListener(this);
+ //mUrlKeyedAnonymizedData.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
PreferenceCategory servicesCategory =
(PreferenceCategory) findPreference(PREF_SERVICES_CATEGORY);
@@ -337,9 +337,9 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
//mPrefServiceBridge.setResolveNavigationErrorEnabled((boolean) newValue);
//} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
//UmaSessionStats.changeMetricsReportingConsent((boolean) newValue);
- } else if (PREF_URL_KEYED_ANONYMIZED_DATA.equals(key)) {
- UnifiedConsentServiceBridge.setUrlKeyedAnonymizedDataCollectionEnabled(
- (boolean) newValue);
+ //} else if (PREF_URL_KEYED_ANONYMIZED_DATA.equals(key)) {
+ //UnifiedConsentServiceBridge.setUrlKeyedAnonymizedDataCollectionEnabled(
+ //(boolean) newValue);
}
return true;
}
@@ -513,8 +513,8 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
//mPrefServiceBridge.isSafeBrowsingExtendedReportingEnabled());
//mUsageAndCrashReporting.setChecked(
//mPrivacyPrefManager.isUsageAndCrashReportingPermittedByUser());
- mUrlKeyedAnonymizedData.setChecked(
- UnifiedConsentServiceBridge.isUrlKeyedAnonymizedDataCollectionEnabled());
+ //mUrlKeyedAnonymizedData.setChecked(
+ //UnifiedConsentServiceBridge.isUrlKeyedAnonymizedDataCollectionEnabled());
if (mContextualSearch != null) {
boolean isContextualSearchEnabled = !mPrefServiceBridge.isContextualSearchDisabled();
@@ -579,9 +579,9 @@ public class SyncAndServicesPreferences extends PreferenceFragmentCompat
//if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
//return mPrefServiceBridge.isMetricsReportingManaged();
//}
- if (PREF_URL_KEYED_ANONYMIZED_DATA.equals(key)) {
- return UnifiedConsentServiceBridge.isUrlKeyedAnonymizedDataCollectionManaged();
- }
+ //if (PREF_URL_KEYED_ANONYMIZED_DATA.equals(key)) {
+ //return UnifiedConsentServiceBridge.isUrlKeyedAnonymizedDataCollectionManaged();
+ //}
return false;
};
}
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
index a56576cb45f2..977b4ecd7fcc 100644
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -406,12 +406,12 @@ CHAR-LIMIT guidelines:
<!--<message name="IDS_NAVIGATION_ERROR_SUGGESTIONS_SUMMARY" desc="Summary for a checkbox in Settings that controls pages suggestions on navigation errors and informs the user about the data shared by this feature.">-->
<!--Sends the URL of a page you're trying to reach to Google-->
<!--</message>-->
- <message name="IDS_URL_KEYED_ANONYMIZED_DATA_TITLE" desc="Title for a checkbox in Settings that controls non-personalized URL collection and informs the user about the data shared by this feature.">
- Make searches and browsing better
- </message>
- <message name="IDS_URL_KEYED_ANONYMIZED_DATA_SUMMARY" desc="Summary for a checkbox in Settings that controls non-personalized URL collection and informs the user about the data shared by this feature.">
- Sends URLs of pages you visit to Google
- </message>
+ <!--<message name="IDS_URL_KEYED_ANONYMIZED_DATA_TITLE" desc="Title for a checkbox in Settings that controls non-personalized URL collection and informs the user about the data shared by this feature.">-->
+ <!--Make searches and browsing better-->
+ <!--</message>-->
+ <!--<message name="IDS_URL_KEYED_ANONYMIZED_DATA_SUMMARY" desc="Summary for a checkbox in Settings that controls non-personalized URL collection and informs the user about the data shared by this feature.">-->
+ <!--Sends URLs of pages you visit to Google-->
+ <!--</message>-->
<message name="IDS_PRIVACY_SYNC_AND_SERVICES_LINK" desc="The text for Privacy preferences that is shown after all preference rows.">
For more settings that relate to privacy, security, and data collection, see <ph name="BEGIN_LINK"><link></ph>Services<ph name="END_LINK"></link></ph>
</message>
--
2.23.0