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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 if (response.httpStatusCode() == 302 || response.httpStatusCode() == 307) { | 330 if (response.httpStatusCode() == 302 || response.httpStatusCode() == 307) { |
331 // Default to not cacheable. | 331 // Default to not cacheable. |
332 // FIXME: Consider allowing these to be cached if they have headers perm
itting caching. | 332 // FIXME: Consider allowing these to be cached if they have headers perm
itting caching. |
333 return false; | 333 return false; |
334 } | 334 } |
335 | 335 |
336 return currentAge(response, responseTimestamp) <= freshnessLifetime(response
, responseTimestamp); | 336 return currentAge(response, responseTimestamp) <= freshnessLifetime(response
, responseTimestamp); |
337 } | 337 } |
338 | 338 |
| 339 const ResourceRequest& Resource::lastResourceRequest() |
| 340 { |
| 341 if (!m_redirectChain.size()) |
| 342 return m_resourceRequest; |
| 343 return m_redirectChain.last().m_request; |
| 344 } |
| 345 |
339 void Resource::willSendRequest(ResourceRequest& request, const ResourceResponse&
response) | 346 void Resource::willSendRequest(ResourceRequest& request, const ResourceResponse&
response) |
340 { | 347 { |
341 m_redirectChain.append(RedirectPair(request, response)); | 348 m_redirectChain.append(RedirectPair(request, response)); |
342 m_requestedFromNetworkingLayer = true; | 349 m_requestedFromNetworkingLayer = true; |
343 } | 350 } |
344 | 351 |
345 bool Resource::unlock() | 352 bool Resource::unlock() |
346 { | 353 { |
347 if (!m_data) | 354 if (!m_data) |
348 return false; | 355 return false; |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 return "Shader"; | 1004 return "Shader"; |
998 case Resource::ImportResource: | 1005 case Resource::ImportResource: |
999 return "ImportResource"; | 1006 return "ImportResource"; |
1000 } | 1007 } |
1001 ASSERT_NOT_REACHED(); | 1008 ASSERT_NOT_REACHED(); |
1002 return "Unknown"; | 1009 return "Unknown"; |
1003 } | 1010 } |
1004 #endif // !LOG_DISABLED | 1011 #endif // !LOG_DISABLED |
1005 | 1012 |
1006 } | 1013 } |
OLD | NEW |