Android build for ungoogled-chromium. https://uc.droidware.info
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
5.3 KiB

From: Wengling Chen <[email protected]>
Date: Mon, 13 Jan 2020 23:03:53 -0500
Subject: Extra fix for build without safe browsing
---
chrome/android/BUILD.gn | 1 -
chrome/android/chrome_java_sources.gni | 1 -
chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java | 8 ++------
chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java | 3 +--
4 files changed, 3 insertions(+), 10 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2780,7 +2780,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/rappor/RapporServiceBridge.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
- "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java",
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationManager.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfAndroidBridge.java",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1315,7 +1315,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/rappor/RapporServiceBridge.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
- "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java",
"java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceMetrics.java",
"java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceNotification.java",
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java
@@ -45,7 +45,6 @@ import org.chromium.chrome.browser.metri
import org.chromium.chrome.browser.preferences.Pref;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.profiles.Profile;
-import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
import org.chromium.chrome.browser.settings.ChromeBasePreference;
import org.chromium.chrome.browser.settings.ChromeSwitchPreference;
import org.chromium.chrome.browser.settings.ManagedPreferenceDelegate;
@@ -374,8 +373,6 @@ public class SyncAndServicesPreferences
} else if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
mPrefServiceBridge.setBoolean(
Pref.PASSWORD_MANAGER_LEAK_DETECTION_ENABLED, (boolean) newValue);
- } else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- SafeBrowsingBridge.setSafeBrowsingExtendedReportingEnabled((boolean) newValue);
} else if (PREF_NAVIGATION_ERROR.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED, (boolean) newValue);
} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
@@ -669,8 +666,7 @@ public class SyncAndServicesPreferences
private void updateLeakDetectionAndSafeBrowsingReportingPreferences() {
boolean safe_browsing_enabled = mPrefServiceBridge.getBoolean(Pref.SAFE_BROWSING_ENABLED);
mSafeBrowsingReporting.setEnabled(safe_browsing_enabled);
- mSafeBrowsingReporting.setChecked(safe_browsing_enabled
- && SafeBrowsingBridge.isSafeBrowsingExtendedReportingEnabled());
+ mSafeBrowsingReporting.setChecked(false);
if (mPasswordLeakDetection == null) return; // Early exit without leak detection to update.
@@ -700,7 +696,7 @@ public class SyncAndServicesPreferences
return mPrefServiceBridge.isManagedPreference(Pref.SEARCH_SUGGEST_ENABLED);
}
if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- return SafeBrowsingBridge.isSafeBrowsingExtendedReportingManaged();
+ return false;
}
if (PREF_SAFE_BROWSING.equals(key)) {
return mPrefServiceBridge.isManagedPreference(Pref.SAFE_BROWSING_ENABLED);
--- a/chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java
@@ -20,7 +20,6 @@ import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskRunner;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.browser.ChromeActivity;
-import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
import org.chromium.chrome.browser.share.ShareHelper;
import org.chromium.chrome.browser.share.ShareParams;
import org.chromium.content_public.browser.WebContents;
@@ -198,7 +197,7 @@ public class ShareServiceImpl implements
for (SharedFile file : files) {
RecordHistogram.recordSparseHistogram(
- "WebShare.Unverified", SafeBrowsingBridge.umaValueForFile(file.name));
+ "WebShare.Unverified", 1);
}
for (SharedFile file : files) {