Commit e8594828 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW: add a systrace for support library startup

No change to logic, this only adds a systrace event to log startup
performance in the support library. This doesn't appear to be an issue
in local benchmarks, but the bot may perform differently.

Bug: 838702
Test: N/A
Change-Id: Idde301b3e620e7ca13e779ac35f08338c58910df
Reviewed-on: https://chromium-review.googlesource.com/1039154Reviewed-by: default avatarChangwan Ryu <changwan@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555498}
parent b00c5d89
...@@ -12,6 +12,7 @@ import android.webkit.WebViewClient; ...@@ -12,6 +12,7 @@ import android.webkit.WebViewClient;
import org.chromium.android_webview.AwContentsClient.AwWebResourceError; import org.chromium.android_webview.AwContentsClient.AwWebResourceError;
import org.chromium.android_webview.AwSafeBrowsingResponse; import org.chromium.android_webview.AwSafeBrowsingResponse;
import org.chromium.android_webview.ScopedSysTraceEvent;
import org.chromium.base.Callback; import org.chromium.base.Callback;
import org.chromium.support_lib_boundary.SafeBrowsingResponseBoundaryInterface; import org.chromium.support_lib_boundary.SafeBrowsingResponseBoundaryInterface;
import org.chromium.support_lib_boundary.WebResourceErrorBoundaryInterface; import org.chromium.support_lib_boundary.WebResourceErrorBoundaryInterface;
...@@ -40,9 +41,13 @@ public class SupportLibWebViewContentsClientAdapter { ...@@ -40,9 +41,13 @@ public class SupportLibWebViewContentsClientAdapter {
} }
public void setWebViewClient(WebViewClient possiblyCompatClient) { public void setWebViewClient(WebViewClient possiblyCompatClient) {
mWebViewClient = convertCompatClient(possiblyCompatClient); try (ScopedSysTraceEvent event = ScopedSysTraceEvent.scoped(
mWebViewClientSupportedFeatures = "SupportLibWebViewContentsClientAdapter.setWebViewClient")) {
mWebViewClient == null ? EMPTY_FEATURE_LIST : mWebViewClient.getSupportedFeatures(); mWebViewClient = convertCompatClient(possiblyCompatClient);
mWebViewClientSupportedFeatures = mWebViewClient == null
? EMPTY_FEATURE_LIST
: mWebViewClient.getSupportedFeatures();
}
} }
@Nullable @Nullable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment