| Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| index 31e8389897ba03dbbff62479cf5bd80ba306983d..b57c1bbef3c98a2d53991cb54263394cad756c5c 100644
|
| --- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| +++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
|
| @@ -463,8 +463,7 @@ Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource
|
|
|
| updateMemoryCacheStats(resource, policy, request, factory, isStaticData);
|
|
|
| - if (policy != Use)
|
| - willSendRequest(identifier, request.mutableResourceRequest(), ResourceResponse(), request.options());
|
| + request.mutableResourceRequest().setAllowStoredCredentials(request.options().allowCredentials == AllowStoredCredentials);
|
|
|
| switch (policy) {
|
| case Reload:
|
| @@ -984,6 +983,9 @@ bool ResourceFetcher::startLoad(Resource* resource)
|
| return false;
|
| }
|
|
|
| + ResourceRequest request(resource->resourceRequest());
|
| + willSendRequest(resource->identifier(), request, ResourceResponse(), resource->options());
|
| +
|
| ResourceLoader* loader = ResourceLoader::create(this, resource);
|
| if (resource->shouldBlockLoadEvent())
|
| m_loaders.add(loader);
|
| @@ -992,7 +994,7 @@ bool ResourceFetcher::startLoad(Resource* resource)
|
|
|
| storeResourceTimingInitiatorInformation(resource);
|
| resource->setFetcherSecurityOrigin(context().getSecurityOrigin());
|
| - loader->start(resource->resourceRequest(), context().loadingTaskRunner(), context().defersLoading());
|
| + loader->start(request, context().loadingTaskRunner(), context().defersLoading());
|
| return true;
|
| }
|
|
|
| @@ -1058,13 +1060,13 @@ bool ResourceFetcher::willFollowRedirect(Resource* resource, ResourceRequest& ne
|
| ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resource);
|
| if (it != m_resourceTimingInfoMap.end())
|
| it->value->addRedirect(redirectResponse);
|
| + newRequest.setAllowStoredCredentials(resource->options().allowCredentials == AllowStoredCredentials);
|
| willSendRequest(resource->identifier(), newRequest, redirectResponse, resource->options());
|
| return true;
|
| }
|
|
|
| void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest& newRequest, const ResourceResponse& redirectResponse, const ResourceLoaderOptions& options)
|
| {
|
| - newRequest.setAllowStoredCredentials(options.allowCredentials == AllowStoredCredentials);
|
| context().dispatchWillSendRequest(identifier, newRequest, redirectResponse, options.initiatorInfo);
|
| }
|
|
|
|
|