Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2834013002: PlzNavigate: make MHTML iframe load working. (Closed)
Patch Set: Addressed comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2b20d2bba3a59d5a0a399f4fb0b09aeaa13d09c5..abc90002fa543e6cc7d648268326ce96cc8184bc 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5598,11 +5598,17 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
}
}
+ // When an MHTML Archive is present, it should be used to serve iframe content
+ // instead of doing a network request.
+ bool use_archive =
+ (info.archive_status == NavigationPolicyInfo::ArchiveStatus::Present) &&
+ !url.SchemeIs(url::kDataScheme);
+
// PlzNavigate: if the navigation is not synchronous, send it to the browser.
// This includes navigations with no request being sent to the network stack.
if (IsBrowserSideNavigationEnabled() &&
info.url_request.CheckForBrowserSideNavigation() &&
- ShouldMakeNetworkRequestForURL(url)) {
+ ShouldMakeNetworkRequestForURL(url) && !use_archive) {
if (info.default_policy == blink::kWebNavigationPolicyCurrentTab) {
// The BeginNavigation() call happens in didStartProvisionalLoad(). We
// need to save information about the navigation here.

Powered by Google App Engine
This is Rietveld 408576698