| Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| index 3e0573ed041b30a2629a12476978a41cab65b7a8..a67676dbb0d5e37b70c3f69b7da89edf9a5690ae 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| @@ -180,8 +180,7 @@ LocalFrame* FrameFetchContext::frame() const
|
|
|
| void FrameFetchContext::addAdditionalRequestHeaders(ResourceRequest& request, FetchResourceType type)
|
| {
|
| - bool isMainResource = type == FetchMainResource;
|
| - if (!isMainResource) {
|
| + if (type != FetchMainResource) {
|
| RefPtr<SecurityOrigin> outgoingOrigin;
|
| if (!request.didSetHTTPReferrer()) {
|
| ASSERT(m_document);
|
| @@ -208,7 +207,7 @@ void FrameFetchContext::addAdditionalRequestHeaders(ResourceRequest& request, Fe
|
| if (frame()->settings() && frame()->settings()->dataSaverEnabled())
|
| request.setHTTPHeaderField("Save-Data", "on");
|
|
|
| - frame()->loader().applyUserAgent(request);
|
| + request.setDefaultHTTPUserAgent(AtomicString(frame()->loader().userAgent()));
|
| }
|
|
|
| CachePolicy FrameFetchContext::getCachePolicy() const
|
| @@ -322,7 +321,7 @@ void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
|
|
|
| void FrameFetchContext::prepareRequest(unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
|
| {
|
| - frame()->loader().applyUserAgent(request);
|
| + request.setDefaultHTTPUserAgent(AtomicString(frame()->loader().userAgent()));
|
| frame()->loader().client()->dispatchWillSendRequest(m_documentLoader, identifier, request, redirectResponse);
|
| }
|
|
|
|
|