Chromium Code Reviews| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 319 resource->setIdentifier(createUniqueIdentifier()); | 319 resource->setIdentifier(createUniqueIdentifier()); |
| 320 resource->setCacheIdentifier(cacheIdentifier); | 320 resource->setCacheIdentifier(cacheIdentifier); |
| 321 resource->finish(); | 321 resource->finish(); |
| 322 memoryCache()->add(resource.get()); | 322 memoryCache()->add(resource.get()); |
| 323 scheduleDocumentResourcesGC(); | 323 scheduleDocumentResourcesGC(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co nst ResourceFactory& factory, const SubstituteData& substituteData) | 326 ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co nst ResourceFactory& factory, const SubstituteData& substituteData) |
| 327 { | 327 { |
| 328 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); | 328 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); |
| 329 TRACE_EVENT0("devtools.timeline", "ResourceFetcher::requestResource"); | |
|
pfeldman
2015/11/09 22:53:45
How is this in both layers, resource dispatcher an
| |
| 329 | 330 |
| 330 context().upgradeInsecureRequest(request); | 331 context().upgradeInsecureRequest(request); |
| 331 context().addClientHintsIfNecessary(request); | 332 context().addClientHintsIfNecessary(request); |
| 332 context().addCSPHeaderIfNecessary(factory.type(), request); | 333 context().addCSPHeaderIfNecessary(factory.type(), request); |
| 333 | 334 |
| 334 bool isStaticData = request.resourceRequest().url().protocolIsData() || subs tituteData.isValid(); | 335 bool isStaticData = request.resourceRequest().url().protocolIsData() || subs tituteData.isValid(); |
| 335 if (isStaticData) | 336 if (isStaticData) |
| 336 preCacheData(request, factory, substituteData); | 337 preCacheData(request, factory, substituteData); |
| 337 | 338 |
| 338 KURL url = request.resourceRequest().url(); | 339 KURL url = request.resourceRequest().url(); |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1159 visitor->trace(m_archiveResourceCollection); | 1160 visitor->trace(m_archiveResourceCollection); |
| 1160 visitor->trace(m_loaders); | 1161 visitor->trace(m_loaders); |
| 1161 visitor->trace(m_nonBlockingLoaders); | 1162 visitor->trace(m_nonBlockingLoaders); |
| 1162 #if ENABLE(OILPAN) | 1163 #if ENABLE(OILPAN) |
| 1163 visitor->trace(m_preloads); | 1164 visitor->trace(m_preloads); |
| 1164 visitor->trace(m_resourceTimingInfoMap); | 1165 visitor->trace(m_resourceTimingInfoMap); |
| 1165 #endif | 1166 #endif |
| 1166 } | 1167 } |
| 1167 | 1168 |
| 1168 } | 1169 } |
| OLD | NEW |