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
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 virtual String encoding() const { return String(); } | 100 virtual String encoding() const { return String(); } |
101 virtual void appendData(const char*, size_t); | 101 virtual void appendData(const char*, size_t); |
102 virtual void error(const ResourceError&); | 102 virtual void error(const ResourceError&); |
103 virtual void setCORSFailed() { } | 103 virtual void setCORSFailed() { } |
104 | 104 |
105 void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSyn
chronousCacheHit = needsSynchronousCacheHit; } | 105 void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSyn
chronousCacheHit = needsSynchronousCacheHit; } |
106 | 106 |
107 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } | 107 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } |
108 bool isLinkPreload() const { return m_linkPreload; } | 108 bool isLinkPreload() const { return m_linkPreload; } |
109 | 109 |
| 110 void setPreloadDiscoveryTime(double preloadDiscoveryTime) { m_preloadDiscove
ryTime = preloadDiscoveryTime; } |
| 111 |
110 const ResourceError& resourceError() const { return m_error; } | 112 const ResourceError& resourceError() const { return m_error; } |
111 | 113 |
112 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } | 114 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } |
113 unsigned long identifier() const { return m_identifier; } | 115 unsigned long identifier() const { return m_identifier; } |
114 | 116 |
115 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } | 117 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } |
116 | 118 |
117 const ResourceRequest& resourceRequest() const { return m_resourceRequest; } | 119 const ResourceRequest& resourceRequest() const { return m_resourceRequest; } |
118 const ResourceRequest& lastResourceRequest() const; | 120 const ResourceRequest& lastResourceRequest() const; |
119 | 121 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 size_t m_decodedSize; | 332 size_t m_decodedSize; |
331 | 333 |
332 // Resource::calculateOverheadSize() is affected by changes in | 334 // Resource::calculateOverheadSize() is affected by changes in |
333 // |m_resourceRequest.url()|, but |m_overheadSize| is not updated after | 335 // |m_resourceRequest.url()|, but |m_overheadSize| is not updated after |
334 // initial |m_resourceRequest| is given, to reduce MemoryCache manipulation | 336 // initial |m_resourceRequest| is given, to reduce MemoryCache manipulation |
335 // and thus potential bugs. crbug.com/594644 | 337 // and thus potential bugs. crbug.com/594644 |
336 const size_t m_overheadSize; | 338 const size_t m_overheadSize; |
337 | 339 |
338 unsigned m_preloadCount; | 340 unsigned m_preloadCount; |
339 | 341 |
| 342 double m_preloadDiscoveryTime; |
| 343 |
340 String m_cacheIdentifier; | 344 String m_cacheIdentifier; |
341 | 345 |
342 unsigned m_preloadResult : 2; // PreloadResult | 346 unsigned m_preloadResult : 2; // PreloadResult |
343 unsigned m_type : 4; // Type | 347 unsigned m_type : 4; // Type |
344 unsigned m_status : 3; // Status | 348 unsigned m_status : 3; // Status |
345 | 349 |
346 unsigned m_needsSynchronousCacheHit : 1; | 350 unsigned m_needsSynchronousCacheHit : 1; |
347 unsigned m_linkPreload : 1; | 351 unsigned m_linkPreload : 1; |
348 | 352 |
349 // Ordered list of all redirects followed while fetching this resource. | 353 // Ordered list of all redirects followed while fetching this resource. |
(...skipping 11 matching lines...) Expand all Loading... |
361 | 365 |
362 Resource::Type m_type; | 366 Resource::Type m_type; |
363 }; | 367 }; |
364 | 368 |
365 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 369 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
366 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); | 370 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); |
367 | 371 |
368 } // namespace blink | 372 } // namespace blink |
369 | 373 |
370 #endif | 374 #endif |
OLD | NEW |