forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds histogram logging to the production code for querying and executing SafeMode. These metrics are patterned after some of the initial Android.WebView.DevUi.* histograms since SafeMode follows a similar implementation. This moves the try-catch into the if-condition. This should not significantly impact stability, as the main concern was about unexpected crashes when exercising the seldom-enabled SafeMode code path, whereas the code outside of the if-condition is covered in the common case. Bug: 1216239 Test: Validity check - start up WebView and verify no unexpected crashes Change-Id: Ib2f4ac525940a4e4c4b639d1780d0e2306529cf6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2957259 Reviewed-by: Richard Coles <[email protected]> Reviewed-by: Jesse Doherty <[email protected]> Commit-Queue: Jesse Doherty <[email protected]> Auto-Submit: Nate Fischer <[email protected]> Cr-Commit-Position: refs/heads/master@{#892576}
- Loading branch information
1 parent
b56b8aa
commit 88e212b
Showing
3 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3361,6 +3361,67 @@ reviews. Googlers can read more about this at go/gwsq-gerrit. | |
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SafeMode.ActionsCount" | ||
units="SafeMode actions" expires_after="2022-06-08"> | ||
<owner>[email protected]</owner> | ||
<owner>src/android_webview/OWNERS</owner> | ||
<summary> | ||
Records the number of SafeMode actions WebView received from the | ||
SafeModeService. This is only recorded once during startup if SafeMode is | ||
enabled (see "Android.WebView.SafeMode.Enabled"), otherwise this | ||
is not recorded at all (because there were no SafeMode actions to execute). | ||
This is recorded before executing any SafeMode actions. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SafeMode.CheckStateBlockingTime" units="ms" | ||
expires_after="2022-06-08"> | ||
<owner>[email protected]</owner> | ||
<owner>src/android_webview/OWNERS</owner> | ||
<summary> | ||
Records the time spent blocking WebView startup to check for SafeMode (see | ||
"Android.WebView.SafeMode.Enabled"). This is recorded once during | ||
WebView startup, regardless of whether SafeMode is enabled. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SafeMode.Enabled" enum="BooleanEnabled" | ||
expires_after="2022-06-08"> | ||
<owner>[email protected]</owner> | ||
<owner>src/android_webview/OWNERS</owner> | ||
<summary> | ||
Records whether or not WebView is starting up in SafeMode. This is a mode | ||
where WebView takes extra steps during startup to reduce the risk of | ||
starting in a bad state. This is recorded once during WebView startup, | ||
regardless of whether SafeMode is enabled. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SafeMode.ExecutionResult" | ||
enum="AndroidWebViewSafeModeResult" expires_after="2022-06-08"> | ||
<owner>[email protected]</owner> | ||
<owner>src/android_webview/OWNERS</owner> | ||
<summary> | ||
Records whether SafeMode was able to execute all the specified SafeMode | ||
actions or if it encountered an error. This is recorded once during WebView | ||
startup and only if SafeMode is enabled (see | ||
"Android.WebView.SafeMode.Enabled"). | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SafeMode.QueryAndExecuteBlockingTime" | ||
units="ms" expires_after="2022-06-08"> | ||
<owner>[email protected]</owner> | ||
<owner>src/android_webview/OWNERS</owner> | ||
<summary> | ||
Records the time spent blocking WebView startup to both retrieve the list of | ||
SafeMode actions from the SafeModeService and to execute those actions. This | ||
is recorded once during startup only if SafeMode is enabled (see | ||
"Android.WebView.SafeMode.Enabled"). This can be interpreted as | ||
the additional startup cost caused by enabling SafeMode. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Android.WebView.SecureCookieAction" enum="SecureCookieAction" | ||
expires_after="2022-05-10"> | ||
<owner>[email protected]</owner> | ||
|