-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handles better failure cases on Android Safe Browsing #19544
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I think we might want to restrict Safe Browsing checks to just HTTP and HTTPS too (maybe in a separate PR).
@@ -142,12 +148,17 @@ public void startUriLookup(final long callbackId, String uri, int[] threatsOfInt | |||
== SafetyNetStatusCodes.SAFE_BROWSING_API_NOT_INITIALIZED) { | |||
initSafeBrowsing(); | |||
startUriLookup(callbackId, uri, threatsOfInterest); | |||
} else { | |||
mObserver.onUrlCheckDone(callbackId, SafeBrowsingResult.TIMEOUT, "{}", | |||
DEFAULT_CHECK_DELTA); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is DEFAULT_CHECK_DELTA
in seconds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// |check_delta| is the number of microseconds it took to look up the URL
// reputation from GmsCore.
sounds good, I'll create a follow up |
Verification PASSED on
Using the STR/Cases outlined via brave/brave-browser#31894 (comment), reproduced that FB was initially loading slowly as per the following: screen-20230802-223929.mp4Ensured that the page was loading quicker/shorter delay with screen-20230803-020734.mp4 |
Resolves brave/brave-browser#31894
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: