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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 for (const Member<Resource>& resource : m_resourcesWithPendingClients) | 288 for (const Member<Resource>& resource : m_resourcesWithPendingClients) |
289 resources.append(resource.get()); | 289 resources.append(resource.get()); |
290 m_resourcesWithPendingClients.clear(); | 290 m_resourcesWithPendingClients.clear(); |
291 | 291 |
292 for (const auto& resource : resources) | 292 for (const auto& resource : resources) |
293 resource->finishPendingClients(); | 293 resource->finishPendingClients(); |
294 } | 294 } |
295 | 295 |
296 Resource::Resource(const ResourceRequest& request, Type type, const ResourceLoad
erOptions& options) | 296 Resource::Resource(const ResourceRequest& request, Type type, const ResourceLoad
erOptions& options) |
297 : m_resourceRequest(request) | 297 : m_resourceRequest(request) |
298 , m_options(options) | |
299 , m_responseTimestamp(currentTime()) | |
300 , m_cancelTimer(this, &Resource::cancelTimerFired) | |
301 , m_loadFinishTime(0) | 298 , m_loadFinishTime(0) |
302 , m_identifier(0) | 299 , m_identifier(0) |
303 , m_encodedSize(0) | 300 , m_encodedSize(0) |
304 , m_decodedSize(0) | 301 , m_decodedSize(0) |
305 , m_overheadSize(calculateOverheadSize()) | 302 , m_overheadSize(calculateOverheadSize()) |
306 , m_preloadCount(0) | 303 , m_preloadCount(0) |
307 , m_preloadDiscoveryTime(0.0) | 304 , m_preloadDiscoveryTime(0.0) |
308 , m_cacheIdentifier(MemoryCache::defaultCacheIdentifier()) | 305 , m_cacheIdentifier(MemoryCache::defaultCacheIdentifier()) |
309 , m_preloadResult(PreloadNotReferenced) | 306 , m_preloadResult(PreloadNotReferenced) |
310 , m_type(type) | 307 , m_type(type) |
311 , m_status(NotStarted) | 308 , m_status(NotStarted) |
312 , m_needsSynchronousCacheHit(false) | 309 , m_needsSynchronousCacheHit(false) |
313 , m_linkPreload(false) | 310 , m_linkPreload(false) |
314 , m_isRevalidating(false) | 311 , m_isRevalidating(false) |
| 312 , m_options(options) |
| 313 , m_responseTimestamp(currentTime()) |
| 314 , m_cancelTimer(this, &Resource::cancelTimerFired) |
315 { | 315 { |
316 ASSERT(m_type == unsigned(type)); // m_type is a bitfield, so this tests car
eless updates of the enum. | 316 ASSERT(m_type == unsigned(type)); // m_type is a bitfield, so this tests car
eless updates of the enum. |
317 InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter); | 317 InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter); |
318 | 318 |
319 // Currently we support the metadata caching only for HTTP family. | 319 // Currently we support the metadata caching only for HTTP family. |
320 if (m_resourceRequest.url().protocolIsInHTTPFamily()) | 320 if (m_resourceRequest.url().protocolIsInHTTPFamily()) |
321 m_cacheHandler = CachedMetadataHandlerImpl::create(this); | 321 m_cacheHandler = CachedMetadataHandlerImpl::create(this); |
322 } | 322 } |
323 | 323 |
324 Resource::~Resource() | 324 Resource::~Resource() |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 case Resource::Media: | 1128 case Resource::Media: |
1129 return "Media"; | 1129 return "Media"; |
1130 case Resource::Manifest: | 1130 case Resource::Manifest: |
1131 return "Manifest"; | 1131 return "Manifest"; |
1132 } | 1132 } |
1133 ASSERT_NOT_REACHED(); | 1133 ASSERT_NOT_REACHED(); |
1134 return "Unknown"; | 1134 return "Unknown"; |
1135 } | 1135 } |
1136 | 1136 |
1137 } // namespace blink | 1137 } // namespace blink |
OLD | NEW |