Commit 22492069 authored by clamy@chromium.org's avatar clamy@chromium.org

Set the right load flag for ResourceRequests on end-to-end reloads

https://chromiumcodereview.appspot.com/309693002/ introduces a cache policy in Blink indicating end-to-end reload. It translates to
the load flag net::LOAD_BYPASS_CACHE (instead of having blink set HTTP cache
headers "Pragma: no-cache" and "Cache-Control: no-cache".

BUG=376025

Review URL: https://codereview.chromium.org/308083009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274807 0039d316-1c4b-4281-b951-d872f2087c98
parent 8193ce4f
......@@ -342,6 +342,9 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
// Required by LayoutTests/http/tests/misc/refresh-headers.php
load_flags |= net::LOAD_VALIDATE_CACHE;
break;
case WebURLRequest::ReloadBypassingCache:
load_flags |= net::LOAD_BYPASS_CACHE;
break;
case WebURLRequest::ReturnCacheDataElseLoad:
load_flags |= net::LOAD_PREFERRING_CACHE;
break;
......
......@@ -2033,6 +2033,7 @@ void RenderViewImpl::didCreateDataSource(WebLocalFrame* frame,
document_state->set_load_type(DocumentState::LINK_LOAD_NORMAL);
break;
case WebURLRequest::ReloadIgnoringCacheData: // reload.
case WebURLRequest::ReloadBypassingCache: // end-to-end reload.
document_state->set_load_type(DocumentState::LINK_LOAD_RELOAD);
break;
case WebURLRequest::ReturnCacheDataElseLoad: // allow stale data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment