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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2661643002: PlzNavigate: handle reload bypassing cache from the renderer (Closed)
Patch Set: Created 3 years, 11 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 71213fce8182bc921564fdfe5a70ff0f05004e79..5b0a32120d3718c460406987b7f720ce6c9fcf52 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -614,7 +614,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()),
@@ -633,10 +634,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;
dgozman 2017/01/31 04:26:42 nit: extra space after '=' here and below
clamy 2017/02/07 09:29:06 Done.
+ else
+ navigation_type = FrameMsg_Navigate_Type::RELOAD;
+ }
const RequestExtraData* extra_data =
static_cast<RequestExtraData*>(info.urlRequest.getExtraData());
@@ -6236,7 +6242,8 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
}
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