| OLD | NEW |
| 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 Loading... |
| 403 DEFINE_RESOURCE_HISTOGRAM("Dead."); | 403 DEFINE_RESOURCE_HISTOGRAM("Dead."); |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource
Factory& factory, const SubstituteData& substituteData) | 407 Resource* ResourceFetcher::requestResource(FetchRequest& request, const Resource
Factory& factory, const SubstituteData& substituteData) |
| 408 { | 408 { |
| 409 DCHECK(request.options().synchronousPolicy == RequestAsynchronously || facto
ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); | 409 DCHECK(request.options().synchronousPolicy == RequestAsynchronously || facto
ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); |
| 410 | 410 |
| 411 context().populateRequestData(request.mutableResourceRequest()); | 411 context().populateRequestData(request.mutableResourceRequest()); |
| 412 if (request.resourceRequest().httpHeaderField("Upgrade-Insecure-Requests") !
= AtomicString("1")) | 412 if (request.resourceRequest().httpHeaderField("Upgrade-Insecure-Requests") !
= AtomicString("1")) |
| 413 context().upgradeInsecureRequest(request.mutableResourceRequest()); | 413 context().addOutgoingSecurityHeadersAndUpgradeRequest(request.mutableRes
ourceRequest()); |
| 414 context().addClientHintsIfNecessary(request); | 414 context().addClientHintsIfNecessary(request); |
| 415 context().addCSPHeaderIfNecessary(factory.type(), request); | 415 context().addCSPHeaderIfNecessary(factory.type(), request); |
| 416 | 416 |
| 417 TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", urlForTrace
Event(request.url())); | 417 TRACE_EVENT1("blink", "ResourceFetcher::requestResource", "url", urlForTrace
Event(request.url())); |
| 418 | 418 |
| 419 if (!request.url().isValid()) | 419 if (!request.url().isValid()) |
| 420 return nullptr; | 420 return nullptr; |
| 421 | 421 |
| 422 if (!context().canRequest(factory.type(), request.resourceRequest(), MemoryC
ache::removeFragmentIdentifierIfNeeded(request.url()), request.options(), reques
t.forPreload(), request.getOriginRestriction())) | 422 if (!context().canRequest(factory.type(), request.resourceRequest(), MemoryC
ache::removeFragmentIdentifierIfNeeded(request.url()), request.options(), reques
t.forPreload(), request.getOriginRestriction())) |
| 423 return nullptr; | 423 return nullptr; |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 visitor->trace(m_context); | 1368 visitor->trace(m_context); |
| 1369 visitor->trace(m_archive); | 1369 visitor->trace(m_archive); |
| 1370 visitor->trace(m_loaders); | 1370 visitor->trace(m_loaders); |
| 1371 visitor->trace(m_nonBlockingLoaders); | 1371 visitor->trace(m_nonBlockingLoaders); |
| 1372 visitor->trace(m_documentResources); | 1372 visitor->trace(m_documentResources); |
| 1373 visitor->trace(m_preloads); | 1373 visitor->trace(m_preloads); |
| 1374 visitor->trace(m_resourceTimingInfoMap); | 1374 visitor->trace(m_resourceTimingInfoMap); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 } // namespace blink | 1377 } // namespace blink |
| OLD | NEW |