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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2834013002: PlzNavigate: make MHTML iframe load working. (Closed)
Patch Set: rebase 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
« no previous file with comments | « content/common/navigation_params.cc ('k') | third_party/WebKit/LayoutTests/mhtml/cid_in_html_iframe.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f0b5cf8608e5009adc379bf6a98d0b8f83561e1b..d40694ed3a8082deee177e4f92aa2b4eaffae13f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5643,11 +5643,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.
« no previous file with comments | « content/common/navigation_params.cc ('k') | third_party/WebKit/LayoutTests/mhtml/cid_in_html_iframe.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698