Skip to content

Commit

Permalink
Add TraceEvent for potential slow call for GooglePlayServices
Browse files Browse the repository at this point in the history
Change-Id: I1820d52d15222871b76866f07dfacd4ecd525e2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3639862
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1002116}
  • Loading branch information
yfriedman authored and Chromium LUCI CQ committed May 11, 2022
1 parent 4eb23bb commit f61ad36
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.StrictModeContext;
import org.chromium.base.TraceEvent;
import org.chromium.base.task.PostTask;
import org.chromium.components.embedder_support.util.Origin;
import org.chromium.content_public.browser.UiThreadTaskTraits;
Expand Down Expand Up @@ -261,7 +262,8 @@ public ExternalAuthGoogleDelegate getGoogleDelegateForTesting() {
*/
protected int checkGooglePlayServicesAvailable(final Context context) {
// TODO(crbug.com/577190): Temporarily allowing disk access until more permanent fix is in.
try (StrictModeContext ignored = StrictModeContext.allowDiskWrites()) {
try (StrictModeContext ignored = StrictModeContext.allowDiskWrites();
TraceEvent e = TraceEvent.scoped("checkGooglePlayServicesAvailable")) {
return ChromiumPlayServicesAvailability.getGooglePlayServicesConnectionResult(context);
}
}
Expand Down

0 comments on commit f61ad36

Please sign in to comment.