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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 rights reserved. | 6 rights reserved. |
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 11 matching lines...) Expand all Loading... |
22 Boston, MA 02110-1301, USA. | 22 Boston, MA 02110-1301, USA. |
23 | 23 |
24 This class provides all functionality needed for loading images, style | 24 This class provides all functionality needed for loading images, style |
25 sheets and html pages from the web. It has a memory cache for these objects. | 25 sheets and html pages from the web. It has a memory cache for these objects. |
26 */ | 26 */ |
27 | 27 |
28 #include "platform/loader/fetch/ResourceFetcher.h" | 28 #include "platform/loader/fetch/ResourceFetcher.h" |
29 | 29 |
30 #include "platform/Histogram.h" | 30 #include "platform/Histogram.h" |
31 #include "platform/RuntimeEnabledFeatures.h" | 31 #include "platform/RuntimeEnabledFeatures.h" |
| 32 #include "platform/instrumentation/PlatformInstrumentation.h" |
32 #include "platform/instrumentation/tracing/TraceEvent.h" | 33 #include "platform/instrumentation/tracing/TraceEvent.h" |
33 #include "platform/instrumentation/tracing/TracedValue.h" | 34 #include "platform/instrumentation/tracing/TracedValue.h" |
34 #include "platform/loader/fetch/FetchContext.h" | 35 #include "platform/loader/fetch/FetchContext.h" |
35 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" | 36 #include "platform/loader/fetch/FetchInitiatorTypeNames.h" |
36 #include "platform/loader/fetch/MemoryCache.h" | 37 #include "platform/loader/fetch/MemoryCache.h" |
37 #include "platform/loader/fetch/ResourceLoader.h" | 38 #include "platform/loader/fetch/ResourceLoader.h" |
38 #include "platform/loader/fetch/ResourceLoadingLog.h" | 39 #include "platform/loader/fetch/ResourceLoadingLog.h" |
39 #include "platform/loader/fetch/ResourceTimingInfo.h" | 40 #include "platform/loader/fetch/ResourceTimingInfo.h" |
40 #include "platform/loader/fetch/UniqueIdentifier.h" | 41 #include "platform/loader/fetch/UniqueIdentifier.h" |
41 #include "platform/mhtml/ArchiveResource.h" | 42 #include "platform/mhtml/ArchiveResource.h" |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 | 1241 |
1241 bool ResourceFetcher::startLoad(Resource* resource) { | 1242 bool ResourceFetcher::startLoad(Resource* resource) { |
1242 DCHECK(resource); | 1243 DCHECK(resource); |
1243 DCHECK(resource->stillNeedsLoad()); | 1244 DCHECK(resource->stillNeedsLoad()); |
1244 if (!context().shouldLoadNewResource(resource->getType())) { | 1245 if (!context().shouldLoadNewResource(resource->getType())) { |
1245 memoryCache()->remove(resource); | 1246 memoryCache()->remove(resource); |
1246 return false; | 1247 return false; |
1247 } | 1248 } |
1248 | 1249 |
1249 ResourceRequest request(resource->resourceRequest()); | 1250 ResourceRequest request(resource->resourceRequest()); |
1250 context().dispatchWillSendRequest(resource->identifier(), request, | 1251 ResourceResponse response; |
1251 ResourceResponse(), | 1252 |
| 1253 blink::probe::PlatformSendRequest probe(&context(), resource->identifier(), |
| 1254 request, response, |
| 1255 resource->options().initiatorInfo); |
| 1256 |
| 1257 context().dispatchWillSendRequest(resource->identifier(), request, response, |
1252 resource->options().initiatorInfo); | 1258 resource->options().initiatorInfo); |
1253 | 1259 |
1254 // TODO(shaochuan): Saving modified ResourceRequest back to |resource|, remove | 1260 // TODO(shaochuan): Saving modified ResourceRequest back to |resource|, remove |
1255 // once dispatchWillSendRequest() takes const ResourceRequest. | 1261 // once dispatchWillSendRequest() takes const ResourceRequest. |
1256 // crbug.com/632580 | 1262 // crbug.com/632580 |
1257 resource->setResourceRequest(request); | 1263 resource->setResourceRequest(request); |
1258 | 1264 |
1259 // Resource requests from suborigins should not be intercepted by the service | 1265 // Resource requests from suborigins should not be intercepted by the service |
1260 // worker of the physical origin. This has the effect that, for now, | 1266 // worker of the physical origin. This has the effect that, for now, |
1261 // suborigins do not work with service workers. See | 1267 // suborigins do not work with service workers. See |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 visitor->trace(m_context); | 1559 visitor->trace(m_context); |
1554 visitor->trace(m_archive); | 1560 visitor->trace(m_archive); |
1555 visitor->trace(m_loaders); | 1561 visitor->trace(m_loaders); |
1556 visitor->trace(m_nonBlockingLoaders); | 1562 visitor->trace(m_nonBlockingLoaders); |
1557 visitor->trace(m_documentResources); | 1563 visitor->trace(m_documentResources); |
1558 visitor->trace(m_preloads); | 1564 visitor->trace(m_preloads); |
1559 visitor->trace(m_resourceTimingInfoMap); | 1565 visitor->trace(m_resourceTimingInfoMap); |
1560 } | 1566 } |
1561 | 1567 |
1562 } // namespace blink | 1568 } // namespace blink |
OLD | NEW |