Skip to content

Commit

Permalink
Removes an extra patch on Android safe browsing
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyZhukovsky committed Nov 29, 2022
1 parent 7ebec40 commit e8488bc
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
8 changes: 0 additions & 8 deletions android/brave_java_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,6 @@ brave_java_base_module_sources = [
"//brave/android/java/org/chromium/chrome/browser/vpn/wireguard/WireguardService.java",
]

brave_java_safe_browsing_sources = [ "//brave/android/java/org/chromium/components/safe_browsing/BraveSafeBrowsingApiHandler.java" ]

brave_java_safe_browsing_deps = [
"//brave/third_party/android_deps:google_play_services_safetynet_java",
"//third_party/android_deps:google_play_services_basement_java",
"//third_party/android_deps:google_play_services_tasks_java",
]

brave_java_base_module_deps = [
"//brave/third_party/android_deps:com_wireguard_android_java",
"//third_party/androidx:androidx_core_core_java",
Expand Down
2 changes: 1 addition & 1 deletion browser/ui/android/strings/android_brave_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,7 @@ If you don't accept this request, VPN will not reconnect and your internet conne
<message name="IDS_SAFE_BROWSING_NO_GOOGLE_PLAY_SERVICES_DIALOG_TITLE" desc="Brave no Google Play Services dialog title">
Cannot enable Safe Browsing
</message>
<message name="IDS_SAFE_BROWSING_NO_GOOGLE_PLAY_SERVICES_DIALOG_MESSAGE" desc="Brave no Google Play Services dialog title">
<message name="IDS_SAFE_BROWSING_NO_GOOGLE_PLAY_SERVICES_DIALOG_MESSAGE" desc="Brave no Google Play Services dialog message">
Safe Browsing has been disabled on your device. To enable it, ensure that Google Play Services is installed and that it's up to date.
</message>
</messages>
Expand Down
1 change: 1 addition & 0 deletions build/android/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ brave_chrome_java_deps = [
"//brave/components/brave_today/common:mojom_java",
"//brave/components/brave_wallet/common:mojom_java",
"//brave/components/browser_ui/site_settings/android:java",
"//brave/components/safe_browsing/android:brave_safe_browsing_java",
"//brave/components/variations/android:java",
"//brave/third_party/android_deps:com_airbnb_android_java",
"//brave/third_party/android_deps:com_android_billingclient_java",
Expand Down
19 changes: 19 additions & 0 deletions components/safe_browsing/android/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2022 The Brave Authors. All rights reserved.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.

import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")

android_library("brave_safe_browsing_java") {
deps = [
"//base:base_java",
"//brave/third_party/android_deps:google_play_services_safetynet_java",
"//build/android:build_java",
"//components/safe_browsing/android:safe_browsing_java",
"//third_party/android_deps:google_play_services_basement_java",
"//third_party/android_deps:google_play_services_tasks_java",
]
sources = [ "java/src/org/chromium/components/safe_browsing/BraveSafeBrowsingApiHandler.java" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.json.JSONObject;

import org.chromium.base.ContextUtils;
import org.chromium.base.Log;

public class BraveSafeBrowsingApiHandler implements SafeBrowsingApiHandler {
private static final long DEFAULT_CHECK_DELTA = 10;
Expand Down Expand Up @@ -100,7 +101,7 @@ public void startUriLookup(final long callbackId, String uri, int[] threatsOfInt
// additional details.
ApiException apiException = (ApiException) e;
if (isDebuggable()) {
org.chromium.base.Log.d(TAG,
Log.d(TAG,
"Error: "
+ CommonStatusCodes.getStatusCodeString(
apiException.getStatusCode())
Expand All @@ -127,7 +128,7 @@ public void startUriLookup(final long callbackId, String uri, int[] threatsOfInt
} else {
// A different, unknown type of error occurred.
if (isDebuggable()) {
org.chromium.base.Log.d(TAG, "Error: " + e.getMessage());
Log.d(TAG, "Error: " + e.getMessage());
}
}
mTriesCount = 0;
Expand Down
12 changes: 0 additions & 12 deletions patches/components-safe_browsing-android-BUILD.gn.patch

This file was deleted.

0 comments on commit e8488bc

Please sign in to comment.