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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 virtual String encoding() const { return String(); } | 98 virtual String encoding() const { return String(); } |
99 virtual void appendData(const char*, size_t); | 99 virtual void appendData(const char*, size_t); |
100 virtual void error(const ResourceError&); | 100 virtual void error(const ResourceError&); |
101 virtual void setCORSFailed() { } | 101 virtual void setCORSFailed() { } |
102 | 102 |
103 void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSyn
chronousCacheHit = needsSynchronousCacheHit; } | 103 void setNeedsSynchronousCacheHit(bool needsSynchronousCacheHit) { m_needsSyn
chronousCacheHit = needsSynchronousCacheHit; } |
104 | 104 |
105 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } | 105 void setLinkPreload(bool isLinkPreload) { m_linkPreload = isLinkPreload; } |
106 bool isLinkPreload() const { return m_linkPreload; } | 106 bool isLinkPreload() const { return m_linkPreload; } |
107 | 107 |
| 108 void setPreloadDiscoveryTime(double preloadDiscoveryTime) { m_preloadDiscove
ryTime = preloadDiscoveryTime; } |
| 109 |
108 const ResourceError& resourceError() const { return m_error; } | 110 const ResourceError& resourceError() const { return m_error; } |
109 | 111 |
110 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } | 112 void setIdentifier(unsigned long identifier) { m_identifier = identifier; } |
111 unsigned long identifier() const { return m_identifier; } | 113 unsigned long identifier() const { return m_identifier; } |
112 | 114 |
113 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } | 115 virtual bool shouldIgnoreHTTPStatusCodeErrors() const { return false; } |
114 | 116 |
115 const ResourceRequest& resourceRequest() const { return m_resourceRequest; } | 117 const ResourceRequest& resourceRequest() const { return m_resourceRequest; } |
116 const ResourceRequest& lastResourceRequest() const; | 118 const ResourceRequest& lastResourceRequest() const; |
117 | 119 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 size_t m_decodedSize; | 328 size_t m_decodedSize; |
327 | 329 |
328 // Resource::calculateOverheadSize() is affected by changes in | 330 // Resource::calculateOverheadSize() is affected by changes in |
329 // |m_resourceRequest.url()|, but |m_overheadSize| is not updated after | 331 // |m_resourceRequest.url()|, but |m_overheadSize| is not updated after |
330 // initial |m_resourceRequest| is given, to reduce MemoryCache manipulation | 332 // initial |m_resourceRequest| is given, to reduce MemoryCache manipulation |
331 // and thus potential bugs. crbug.com/594644 | 333 // and thus potential bugs. crbug.com/594644 |
332 const size_t m_overheadSize; | 334 const size_t m_overheadSize; |
333 | 335 |
334 unsigned m_preloadCount; | 336 unsigned m_preloadCount; |
335 | 337 |
| 338 double m_preloadDiscoveryTime; |
| 339 |
336 String m_cacheIdentifier; | 340 String m_cacheIdentifier; |
337 | 341 |
338 unsigned m_preloadResult : 2; // PreloadResult | 342 unsigned m_preloadResult : 2; // PreloadResult |
339 unsigned m_type : 4; // Type | 343 unsigned m_type : 4; // Type |
340 unsigned m_status : 3; // Status | 344 unsigned m_status : 3; // Status |
341 | 345 |
342 unsigned m_needsSynchronousCacheHit : 1; | 346 unsigned m_needsSynchronousCacheHit : 1; |
343 unsigned m_linkPreload : 1; | 347 unsigned m_linkPreload : 1; |
344 | 348 |
345 // Ordered list of all redirects followed while fetching this resource. | 349 // Ordered list of all redirects followed while fetching this resource. |
(...skipping 11 matching lines...) Expand all Loading... |
357 | 361 |
358 Resource::Type m_type; | 362 Resource::Type m_type; |
359 }; | 363 }; |
360 | 364 |
361 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ | 365 #define DEFINE_RESOURCE_TYPE_CASTS(typeName) \ |
362 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); | 366 DEFINE_TYPE_CASTS(typeName##Resource, Resource, resource, resource->getType(
) == Resource::typeName, resource.getType() == Resource::typeName); |
363 | 367 |
364 } // namespace blink | 368 } // namespace blink |
365 | 369 |
366 #endif | 370 #endif |
OLD | NEW |