Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2147473002: Set 'ResourceRequest::requestorOrigin' in Blink for more request types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jochen Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // |m_preloads| only, because they are major sources of references. 403 // |m_preloads| only, because they are major sources of references.
404 if (resource && !resource->hasClientsOrObservers() && (!m_preloads || !m_pre loads->contains(resource))) { 404 if (resource && !resource->hasClientsOrObservers() && (!m_preloads || !m_pre loads->contains(resource))) {
405 DEFINE_RESOURCE_HISTOGRAM("Dead."); 405 DEFINE_RESOURCE_HISTOGRAM("Dead.");
406 } 406 }
407 } 407 }
408 408
409 Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource Factory& factory, const SubstituteData& substituteData) 409 Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource Factory& factory, const SubstituteData& substituteData)
410 { 410 {
411 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); 411 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet);
412 412
413 context().populateRequestData(request.mutableResourceRequest());
413 if (request.resourceRequest().httpHeaderField("Upgrade-Insecure-Requests") ! = AtomicString("1")) 414 if (request.resourceRequest().httpHeaderField("Upgrade-Insecure-Requests") ! = AtomicString("1"))
414 context().upgradeInsecureRequest(request.mutableResourceRequest()); 415 context().upgradeInsecureRequest(request.mutableResourceRequest());
415 context().addClientHintsIfNecessary(request); 416 context().addClientHintsIfNecessary(request);
416 context().addCSPHeaderIfNecessary(factory.type(), request); 417 context().addCSPHeaderIfNecessary(factory.type(), request);
417 418
418 TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", urlForTrace Event(request.url())); 419 TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", urlForTrace Event(request.url()));
419 420
420 if (!request.url().isValid()) 421 if (!request.url().isValid())
421 return nullptr; 422 return nullptr;
422 423
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 visitor->trace(m_context); 1263 visitor->trace(m_context);
1263 visitor->trace(m_archive); 1264 visitor->trace(m_archive);
1264 visitor->trace(m_loaders); 1265 visitor->trace(m_loaders);
1265 visitor->trace(m_nonBlockingLoaders); 1266 visitor->trace(m_nonBlockingLoaders);
1266 visitor->trace(m_documentResources); 1267 visitor->trace(m_documentResources);
1267 visitor->trace(m_preloads); 1268 visitor->trace(m_preloads);
1268 visitor->trace(m_resourceTimingInfoMap); 1269 visitor->trace(m_resourceTimingInfoMap);
1269 } 1270 }
1270 1271
1271 } // namespace blink 1272 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchContext.cpp ('k') | third_party/WebKit/Source/core/loader/BeaconLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698