WebView startup is delayed by querying for Safe Browsing user consent |
|||
Issue descriptionSee also: http://crrev/i/611093. WebView startup is currently unnecessarily delayed by querying for Safe Browsing user consent. We query for Safe Browsing user consent asynchronously using PlatformServiceBridge#querySafeBrowsingUserConsent [1]. Under the hood, the downstream implementation of this method calls an async GMS API [2]. Even though that API itself is async, the synchronous parts of the method take a long time (initial estimates are ~9ms, thorough results will be posted here [3]). We should post this work (similar to http://crrev/i/611093) to improve startup. Because querySafeBrowsingUserConsent is asynchronous, it has always been possible that we would detect a known-malicious URL, but would not know the user's opt-in preference (and would therefore mark this as a "safe" URL). If we re-implement querySafeBrowsingUserConsent to use AsyncTask, we should be careful to check that we don't hit this case significantly more frequently. [1] https://cs.chromium.org/chromium/src/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java?l=54&rcl=90e886d1638437a1346367e36bbff675a826fe66 [2] https://cs.corp.google.com/clankium/src/clank/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridgeImpl.java?q=package:clankium+f:clank+querySafeBrowsingUserConsent&l=136 [3] https://docs.google.com/spreadsheets/d/1r-u4la0eXvaTIwsuoSO5jBmghn2TBBR9Dj8FGtyvSqg/edit?usp=sharing
,
Apr 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e828005515489de18a46730b52273a6b3e052b23 commit e828005515489de18a46730b52273a6b3e052b23 Author: Nate Fischer <ntfschr@chromium.org> Date: Thu Apr 26 19:36:59 2018 AW: mark variable as synchronized This marks Safe Browsing user opt-out as volatile, since it may be set by a background thread. This also documents that querySafeBrowsingUserConsent can invoke the callback on any thread (because this will be implemented by http://crrev/i/615168). Bug: 835497 Test: manual Change-Id: I557dd5979aeaf7a4a2119ec0c8604528278e05a6 Reviewed-on: https://chromium-review.googlesource.com/1029423 Commit-Queue: Nate Fischer <ntfschr@chromium.org> Reviewed-by: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#554118} [modify] https://crrev.com/e828005515489de18a46730b52273a6b3e052b23/android_webview/java/src/org/chromium/android_webview/AwSafeBrowsingConfigHelper.java [modify] https://crrev.com/e828005515489de18a46730b52273a6b3e052b23/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
,
Apr 27 2018
The following revision refers to this bug: https://chrome-internal.googlesource.com/clank/internal/apps/+/d3953c5ec81ea722d28f1bb142df5361c59ffbbc commit d3953c5ec81ea722d28f1bb142df5361c59ffbbc Author: Nate Fischer <ntfschr@google.com> Date: Fri Apr 27 22:50:05 2018
,
Apr 27 2018
No manual verification necessary.
,
Aug 25
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point. |
|||
►
Sign in to add a comment |
|||
Comment 1 by ntfschr@chromium.org
, Apr 24 2018