Commit Graph
16 Commits
Author SHA1 Message Date
Serg f939cd614c Fixes a crash when SafeBrowsing API returns an error in certain cases (#27472) 2025-02-04 09:52:53 -05:00
Artem Samoilenko 527432deac [Android] Fixes for NoStreams lint errors
For now we just suppress them as there is no uniform fix for all of them. Follow up issue is created to address this https://github.com/brave/brave-browser/issues/42632

Chromium change:
https://chromium.googlesource.com/chromium/src/+/31928c984432e9d2f7c71438a716a417f378dff5

Reland "Android: Add Error Prone warning against Java stream() apis"

This reverts commit 8ff33dbc1ddcaabcf4da1b92868bfa26ae34ba8f.

Reason for reland: Internal fix landed

Original change's description:
> Revert "Android: Add Error Prone warning against Java stream() apis"
>
> This reverts commit e910d272c026bf1463f54ea17ce6fb16f55513cf.
>
> Reason for revert: crbug.com/344943957#comment13
>
> Original change's description:
> > Android: Add Error Prone warning against Java stream() apis
> >
> > And minor clarifying tweaks to style guide wrt streams
> >
> > Bug: 344943957
> > Change-Id: I90b976866c8f3f71826459b7d3097692e1f533b4
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042674
> > Auto-Submit: Andrew Grieve <agrieve@chromium.org>
> > Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1388426}
>
> Bug: 344943957
> Change-Id: Ib9b3d8db9f47383eaced5192a15e7cac6427da35
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6051419
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Auto-Submit: Keigo Oka <oka@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1388467}

Bug: 344943957
2025-01-27 09:36:40 -05:00
SergandFrancois Marier 0fb665213a Adds a settings to show SafeBrowsing errors under Developer options on Android (#27333)
* Adds a settings to show SafeBrowsing errors under Developer options on Android

* Update browser/ui/android/strings/android_brave_strings.grd

Co-authored-by: Francois Marier <francois@brave.com>

* Fixes a header

---------

Co-authored-by: Francois Marier <francois@brave.com>
2025-01-24 10:35:03 -05:00
AlexeyBarabash 66ed227d8d Removed failed assertions for SUBRESOURCE_FILTER and CSD_ALLOWLIST responses (#26920)
Removed failed assertions for SUBRESOURCE_FILTER and CSD_ALLOWLIST SafetyNet response codes
2024-12-09 11:38:17 +02:00
AlexeyBarabashandFrancois Marier 7c79b15516 [Android] Select the highest priority threat from SafetyNetClient.loo… (#26195)
* [Android] Select the highest priority threat from SafetyNetClient.lookupUri response
fixes brave/brave-browser#41581
---------
Co-authored-by: Francois Marier <francois@brave.com>
2024-10-25 17:44:29 +03:00
AlexeyBarabash b04bb97c68 Redone SafeBrowsing by using SafeBrowsingApiHandler and SafetyNetClient (#25842)
Fixes brave/brave-browser#41407

Related Chromium change
https://source.chromium.org/chromium/chromium/src/+/e5700c49b75254cc1201a3bbea59b20b06328a27

Remove remaining functions in the interface.

	Internal reference was removed in https://crrev.com/i/7648757

	OBSOLETE_HISTOGRAMS=No longer logged because URLs are checked through
	the new GMSCore Safe Browsing API.

	Bug: 40935425
	Change-Id: I3ab1e5783395c63586bd4c5163541161027004bb
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837639
2024-10-15 10:00:10 +03:00
AlexeyBarabash 7481e655de [WIP] [Android] SafetyNetApiHandler interface has no startUriLookup method anymore
To check the websites urls now SafeBrowsingApiHandler must be used.

This commit disables BraveSafeBrowsingApiHandler class, which in fact implements SafetyNetApiHandler.

Related Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/e5700c49b75254cc1201a3bbea59b20b06328a27
	Remove remaining functions in the interface.

	Internal reference was removed in https://crrev.com/i/7648757

	OBSOLETE_HISTOGRAMS=No longer logged because URLs are checked through
	the new GMSCore Safe Browsing API.

	Bug: 40935425
	Change-Id: I3ab1e5783395c63586bd4c5163541161027004bb
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837639

https://source.chromium.org/chromium/chromium/src/+/4d1a9d3d10a3d6e1697270afc723687b6eb94810
	Remove unused functions after migrating URL checks to new GmsCore API.

	After the feature flag was removed in https://crrev.com/c/5805204,
	some functions, enums and histograms are no longer used.

	Some functions in the SafetyNetApiHandler interface are kept in this
	CL because they are still used in the internal repo. They will be
	removed in a follow-up CL.

	OBSOLETE_HISTOGRAMS=No longer logged because URLs are checked through
	the new GMSCore Safe Browsing API.

	Bug: 40935425
	Change-Id: I03cbc731ee14084f1af8ffe30670e50ea8175391
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838697

https://source.chromium.org/chromium/chromium/src/+/42a1ef002790b1e5a7345c24ba3673224499d4f3
	Remove SafeBrowsingNewGmsApiForBrowseUrlDatabaseCheck feature flag

	This flag is set to enable by default since M129. Internal usage of
	this flag was removed in https://crrev.com/i/7608690.

	Bug: 40935425
	Change-Id: I83111aeefb92d52e5fdc938678764500e14992ef
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5805204
2024-10-03 17:06:27 +01:00
Artem Samoilenko 8d9d5238a1 [Android] Remove default implementations of SafetyNetApiHandler app verification methods
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/bdc8576287c548b3d131437532794cb980b792c4

Remove default implementations of SafetyNetApiHandler app verification methods

The default implementations were added so we could land implementations
in clank internal without breaking the build. That's now done, so we no
longer need the defaults.

Bug: 341790041
2024-06-25 13:13:11 +01:00
Artem Samoilenko ce399e0143 [Android] Added filter for safe browsing checks for http and https urls only 2024-04-29 16:49:41 -04:00
Serg c267e1af44 Handles better failure cases on Android Safe Browsing 2023-08-02 15:07:20 -04:00
Artem Samoilenko bf529821bc [Android] Java code adjustments to C115 upstream changes 2023-06-19 16:00:16 -04:00
AlexeyBarabash 6523c3bace Enable CheckJavaStyle presubmit check (#18761)
* Enable CheckJavaStyle presubmit check

For now severity for all checks except RedundantImport/UnusedImports
is changed from error to warning with brave-style-5.0.xml.

Once all Java style errors will be fixed, check should be switched
back to upstream's original check.

Fixes brave/brave-browser#30823

* Remove all unused/redundant imports from java files
2023-06-07 20:44:28 +03:00
Serg 6a612f6873 Enables Safe Browsing flag on Android by default 2023-01-05 13:25:08 -05:00
Serg 36c85ffe1b Sets Safe Browsing handler only once on Android 2022-12-12 15:30:36 -05:00
Serg 9a8b4ba319 Makes initSafeBrowsing call on Android every 30 seconds as upstream does 2022-12-12 10:16:38 -05:00
Serg e8488bcc17 Removes an extra patch on Android safe browsing 2022-11-29 09:15:24 -05:00