commit | 3286ab7a7c5f2c0afc14dbc59140788eea149369 | [log] [tgz] |
---|---|---|
author | Charlie Harrison <[email protected]> | Wed Feb 13 20:13:30 2019 |
committer | Commit Bot <[email protected]> | Wed Feb 13 20:13:30 2019 |
tree | b110ab6253db5af095162f515cda4d21e985990e | |
parent | 8e40f476d53ebe74b14e87365c7fdde7fa8238a7 [diff] [blame] |
Stop doing async navigation interception on Android Webview This feature improves page load time a lot on Chrome for Android, but seems to regress performance on Android Webview [1]. On Webview, it seems like the JNI calls tend to be quite a bit faster than in Chrome, so the latency of doing an async post task probably ends up being a detriment. Previously, this check was done via a platform ifdef. This CL turns the "async policy" into an enum which is set in the intercept throttle's constructor. [1]: https://uma.googleplex.com/p/chrome/variations/?sid=662865f2d88a2d6cbdf5748f0124c8f9 Change-Id: I36ce7dfd21ae3c50f0a2b0568a3f681ebad8f2bf Reviewed-on: https://chromium-review.googlesource.com/c/1466866 Reviewed-by: Richard Coles <[email protected]> Reviewed-by: Avi Drissman <[email protected]> Reviewed-by: Nate Fischer <[email protected]> Commit-Queue: Charlie Harrison <[email protected]> Cr-Commit-Position: refs/heads/master@{#631869}
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index e8be85e..5df10b80 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -4116,7 +4116,7 @@ if (!prerender_contents && handle->IsInMainFrame()) { throttles.push_back( navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( - handle)); + handle, navigation_interception::SynchronyMode::kAsync)); } throttles.push_back(InterceptOMADownloadNavigationThrottle::Create(handle)); #elif BUILDFLAG(ENABLE_EXTENSIONS)