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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2661643002: PlzNavigate: handle reload bypassing cache from the renderer (Closed)
Patch Set: Rebase + addressed comments Created 3 years, 10 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 | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('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 1876c41d41ccca21f5496a0023cacb8bb1e3f737..223e6d3cc45e5656fbd0dfefbc6595f354789ba6 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -618,7 +618,8 @@ base::TimeTicks SanitizeNavigationTiming(
// PlzNavigate
CommonNavigationParams MakeCommonNavigationParams(
- const blink::WebFrameClient::NavigationPolicyInfo& info) {
+ const blink::WebFrameClient::NavigationPolicyInfo& info,
+ int load_flags) {
Referrer referrer(
GURL(info.urlRequest.httpHeaderField(
WebString::fromUTF8("Referer")).latin1()),
@@ -637,10 +638,15 @@ CommonNavigationParams MakeCommonNavigationParams(
static_cast<FrameMsg_UILoadMetricsReportType::Value>(
info.urlRequest.inputPerfMetricReportPolicy());
+ // Determine the navigation type.
FrameMsg_Navigate_Type::Value navigation_type =
- info.navigationType == blink::WebNavigationTypeReload
- ? FrameMsg_Navigate_Type::RELOAD
- : FrameMsg_Navigate_Type::NORMAL;
+ FrameMsg_Navigate_Type::NORMAL;
+ if (info.navigationType == blink::WebNavigationTypeReload) {
+ if (load_flags & net::LOAD_BYPASS_CACHE)
+ navigation_type = FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE;
+ else
+ navigation_type = FrameMsg_Navigate_Type::RELOAD;
+ }
const RequestExtraData* extra_data =
static_cast<RequestExtraData*>(info.urlRequest.getExtraData());
@@ -6260,7 +6266,8 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
begin_navigation_params.client_side_redirect_url = frame_->document().url();
Send(new FrameHostMsg_BeginNavigation(
- routing_id_, MakeCommonNavigationParams(info), begin_navigation_params));
+ routing_id_, MakeCommonNavigationParams(info, load_flags),
+ begin_navigation_params));
}
void RenderFrameImpl::LoadDataURL(
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698