Commit 0a5fb17a authored by darin@chromium.org's avatar darin@chromium.org

Reland r69146

Use WebFrame::createAssociatedURLLoader.

See https://bugs.webkit.org/show_bug.cgi?id=49764 for the
WebKit side of this change.

R=michaeln
BUG=none
TEST=none
Originally reviewed at: http://codereview.chromium.org/5139005

Review URL: http://codereview.chromium.org/5920003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71495 0039d316-1c4b-4281-b951-d872f2087c98
parent 79558c2a
......@@ -1178,22 +1178,13 @@ bool WebPluginImpl::InitiateHTTPRequest(unsigned long resource_id,
SetReferrer(&info.request, referrer_flag);
// Sets the routing id to associate the ResourceRequest with the RenderView.
webframe_->dispatchWillSendRequest(info.request);
// Sets the appcache host id to allow retrieval from the appcache.
if (WebApplicationCacheHostImpl* appcache_host =
WebApplicationCacheHostImpl::FromFrame(webframe_)) {
appcache_host->willStartSubResourceRequest(info.request);
}
if (WebDevToolsAgent* devtools_agent = GetDevToolsAgent()) {
devtools_agent->identifierForInitialRequest(resource_id, webframe_,
info.request);
devtools_agent->willSendRequest(resource_id, info.request);
}
info.loader.reset(WebKit::webKitClient()->createURLLoader());
info.loader.reset(webframe_->createAssociatedURLLoader());
if (!info.loader.get())
return false;
info.loader->loadAsynchronously(info.request, this);
......
......@@ -249,15 +249,7 @@ int32_t PPB_URLLoader_Impl::Open(PPB_URLRequestInfo_Impl* request,
if (rv != PP_OK)
return rv;
frame->dispatchWillSendRequest(web_request);
// Sets the appcache host id to allow retrieval from the appcache.
if (WebApplicationCacheHostImpl* appcache_host =
WebApplicationCacheHostImpl::FromFrame(frame)) {
appcache_host->willStartSubResourceRequest(web_request);
}
loader_.reset(WebKit::webKitClient()->createURLLoader());
loader_.reset(frame->createAssociatedURLLoader());
if (!loader_.get())
return PP_ERROR_FAILED;
......
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