| 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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 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 | 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // the cache entry file | 194 // the cache entry file |
| 195 virtual void finish(double finishTime); | 195 virtual void finish(double finishTime); |
| 196 void finish() { finish(0.0); } | 196 void finish() { finish(0.0); } |
| 197 | 197 |
| 198 // FIXME: Remove the stringless variant once all the callsites' error messages | 198 // FIXME: Remove the stringless variant once all the callsites' error messages |
| 199 // are updated. | 199 // are updated. |
| 200 bool passesAccessControlCheck(SecurityOrigin*) const; | 200 bool passesAccessControlCheck(SecurityOrigin*) const; |
| 201 bool passesAccessControlCheck(SecurityOrigin*, | 201 bool passesAccessControlCheck(SecurityOrigin*, |
| 202 String& errorDescription) const; | 202 String& errorDescription) const; |
| 203 | 203 |
| 204 bool isEligibleForIntegrityCheck(SecurityOrigin*) const; | |
| 205 | |
| 206 virtual PassRefPtr<const SharedBuffer> resourceBuffer() const { | 204 virtual PassRefPtr<const SharedBuffer> resourceBuffer() const { |
| 207 return m_data; | 205 return m_data; |
| 208 } | 206 } |
| 209 void setResourceBuffer(PassRefPtr<SharedBuffer>); | 207 void setResourceBuffer(PassRefPtr<SharedBuffer>); |
| 210 | 208 |
| 211 virtual bool willFollowRedirect(const ResourceRequest&, | 209 virtual bool willFollowRedirect(const ResourceRequest&, |
| 212 const ResourceResponse&); | 210 const ResourceResponse&); |
| 213 | 211 |
| 214 // Called when a redirect response was received but a decision has already | 212 // Called when a redirect response was received but a decision has already |
| 215 // been made to not follow it. | 213 // been made to not follow it. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 DCHECK(m_preloadCount); | 251 DCHECK(m_preloadCount); |
| 254 --m_preloadCount; | 252 --m_preloadCount; |
| 255 } | 253 } |
| 256 | 254 |
| 257 bool canReuseRedirectChain(); | 255 bool canReuseRedirectChain(); |
| 258 bool mustRevalidateDueToCacheHeaders(); | 256 bool mustRevalidateDueToCacheHeaders(); |
| 259 bool canUseCacheValidator(); | 257 bool canUseCacheValidator(); |
| 260 bool isCacheValidator() const { return m_isRevalidating; } | 258 bool isCacheValidator() const { return m_isRevalidating; } |
| 261 bool hasCacheControlNoStoreHeader() const; | 259 bool hasCacheControlNoStoreHeader() const; |
| 262 bool hasVaryHeader() const; | 260 bool hasVaryHeader() const; |
| 263 virtual bool mustRefetchDueToIntegrityMetadata( | 261 |
| 264 const FetchRequest& request) const { | 262 bool isEligibleForIntegrityCheck(SecurityOrigin*) const; |
| 265 return false; | 263 |
| 264 void setIntegrityMetadata(const IntegrityMetadataSet& metadata) { |
| 265 m_integrityMetadata = metadata; |
| 266 } | 266 } |
| 267 const IntegrityMetadataSet& integrityMetadata() const { |
| 268 return m_integrityMetadata; |
| 269 } |
| 270 // The argument must never be |NotChecked|. |
| 271 void setIntegrityDisposition(ResourceIntegrityDisposition); |
| 272 ResourceIntegrityDisposition integrityDisposition() const { |
| 273 return m_integrityDisposition; |
| 274 } |
| 275 bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const; |
| 267 | 276 |
| 268 double currentAge() const; | 277 double currentAge() const; |
| 269 double freshnessLifetime(); | 278 double freshnessLifetime(); |
| 270 double stalenessLifetime(); | 279 double stalenessLifetime(); |
| 271 | 280 |
| 272 bool isAlive() const { return m_isAlive; } | 281 bool isAlive() const { return m_isAlive; } |
| 273 | 282 |
| 274 void setCacheIdentifier(const String& cacheIdentifier) { | 283 void setCacheIdentifier(const String& cacheIdentifier) { |
| 275 m_cacheIdentifier = cacheIdentifier; | 284 m_cacheIdentifier = cacheIdentifier; |
| 276 } | 285 } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 | 416 |
| 408 unsigned m_preloadResult : 2; // PreloadResult | 417 unsigned m_preloadResult : 2; // PreloadResult |
| 409 unsigned m_type : 4; // Type | 418 unsigned m_type : 4; // Type |
| 410 unsigned m_status : 3; // Status | 419 unsigned m_status : 3; // Status |
| 411 | 420 |
| 412 unsigned m_needsSynchronousCacheHit : 1; | 421 unsigned m_needsSynchronousCacheHit : 1; |
| 413 unsigned m_linkPreload : 1; | 422 unsigned m_linkPreload : 1; |
| 414 bool m_isRevalidating : 1; | 423 bool m_isRevalidating : 1; |
| 415 bool m_isAlive : 1; | 424 bool m_isAlive : 1; |
| 416 | 425 |
| 426 ResourceIntegrityDisposition m_integrityDisposition; |
| 427 IntegrityMetadataSet m_integrityMetadata; |
| 428 |
| 417 // Ordered list of all redirects followed while fetching this resource. | 429 // Ordered list of all redirects followed while fetching this resource. |
| 418 Vector<RedirectPair> m_redirectChain; | 430 Vector<RedirectPair> m_redirectChain; |
| 419 | 431 |
| 420 HeapHashCountedSet<WeakMember<ResourceClient>> m_clients; | 432 HeapHashCountedSet<WeakMember<ResourceClient>> m_clients; |
| 421 HeapHashCountedSet<WeakMember<ResourceClient>> m_clientsAwaitingCallback; | 433 HeapHashCountedSet<WeakMember<ResourceClient>> m_clientsAwaitingCallback; |
| 422 HeapHashCountedSet<WeakMember<ResourceClient>> m_finishedClients; | 434 HeapHashCountedSet<WeakMember<ResourceClient>> m_finishedClients; |
| 423 | 435 |
| 424 ResourceLoaderOptions m_options; | 436 ResourceLoaderOptions m_options; |
| 425 | 437 |
| 426 double m_responseTimestamp; | 438 double m_responseTimestamp; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 450 }; | 462 }; |
| 451 | 463 |
| 452 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 464 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
| 453 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ | 465 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, \ |
| 454 resource->getType() == Resource::typeName, \ | 466 resource->getType() == Resource::typeName, \ |
| 455 resource.getType() == Resource::typeName); | 467 resource.getType() == Resource::typeName); |
| 456 | 468 |
| 457 } // namespace blink | 469 } // namespace blink |
| 458 | 470 |
| 459 #endif | 471 #endif |
| OLD | NEW |