Commit bb2f6a0e authored by mkwst@chromium.org's avatar mkwst@chromium.org

Remove 'WebURLRequest::TargetType' from WebURLLoader.

'WebURLRequest::TargetType' has been dropped in Blink in favor of
'RequestContext' and 'FrameType', matching the Fetch specification's
changes, and allowing both more granularity in various Blink-side checks
and more clarity around the thing that caused a request, and the frame
that the request affects.

This CL should have zero practical effect, as it's simply hoisting the
translation work that 'WebURLRequest::setTargetType' is already doing
up into the content layer to bring us one step closer to removing the
concept entirely.

BUG=390497

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284639 0039d316-1c4b-4281-b951-d872f2087c98
parent bfed9e10
......@@ -366,7 +366,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
if (!request.allowStoredCredentials())
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
if (request.targetType() == WebURLRequest::TargetIsXHR &&
if (request.requestContext() == WebURLRequest::RequestContextXMLHttpRequest &&
(url.has_username() || url.has_password())) {
load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN;
}
......@@ -678,12 +678,12 @@ bool WebURLLoaderImpl::Context::CanHandleDataURL(const GURL& url) const {
#if defined(OS_ANDROID)
// For compatibility reasons on Android we need to expose top-level data://
// to the browser.
if (request_.targetType() == WebURLRequest::TargetIsMainFrame)
if (request_.frameType() == WebURLRequest::FrameTypeTopLevel)
return false;
#endif
if (request_.targetType() != WebURLRequest::TargetIsMainFrame &&
request_.targetType() != WebURLRequest::TargetIsSubframe)
if (request_.frameType() != WebURLRequest::FrameTypeTopLevel &&
request_.frameType() != WebURLRequest::FrameTypeNested)
return true;
std::string mime_type, unused_charset;
......
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