| 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) 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 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 // Certain requests (e.g., XHRs) might have manually set headers that requir
e revalidation. | 730 // Certain requests (e.g., XHRs) might have manually set headers that requir
e revalidation. |
| 731 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo
ryCache revalidation path assumes a whole bunch | 731 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo
ryCache revalidation path assumes a whole bunch |
| 732 // of things about how revalidation works that manual headers violate, so pu
nt to Reload instead. | 732 // of things about how revalidation works that manual headers violate, so pu
nt to Reload instead. |
| 733 if (request.isConditional()) | 733 if (request.isConditional()) |
| 734 return Reload; | 734 return Reload; |
| 735 | 735 |
| 736 // Don't reload resources while pasting. | 736 // Don't reload resources while pasting. |
| 737 if (m_allowStaleResources) | 737 if (m_allowStaleResources) |
| 738 return Use; | 738 return Use; |
| 739 | 739 |
| 740 if (request.cachePolicy() == ResourceRequestCachePolicy::ReloadBypassingCach
e) |
| 741 return Reload; |
| 742 |
| 740 if (!fetchRequest.options().canReuseRequest(existingResource->options())) | 743 if (!fetchRequest.options().canReuseRequest(existingResource->options())) |
| 741 return Reload; | 744 return Reload; |
| 742 | 745 |
| 743 // Always use preloads. | 746 // Always use preloads. |
| 744 if (existingResource->isPreloaded()) | 747 if (existingResource->isPreloaded()) |
| 745 return Use; | 748 return Use; |
| 746 | 749 |
| 747 // CachePolicyHistoryBuffer uses the cache no matter what. | 750 // CachePolicyHistoryBuffer uses the cache no matter what. |
| 748 CachePolicy cachePolicy = context().cachePolicy(); | 751 CachePolicy cachePolicy = context().cachePolicy(); |
| 749 if (cachePolicy == CachePolicyHistoryBuffer) | 752 if (cachePolicy == CachePolicyHistoryBuffer) |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 ResourceLoaderHost::trace(visitor); | 1301 ResourceLoaderHost::trace(visitor); |
| 1299 } | 1302 } |
| 1300 | 1303 |
| 1301 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) | 1304 ResourceFetcher* ResourceFetcher::toResourceFetcher(ResourceLoaderHost* host) |
| 1302 { | 1305 { |
| 1303 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); | 1306 ASSERT(host->objectType() == ResourceLoaderHost::ResourceFetcherType); |
| 1304 return static_cast<ResourceFetcher*>(host); | 1307 return static_cast<ResourceFetcher*>(host); |
| 1305 } | 1308 } |
| 1306 | 1309 |
| 1307 } | 1310 } |
| OLD | NEW |