Chromium Code Reviews| 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 953 return !canUseResponse(m_response, m_responseTimestamp) || m_resourceRequest .cacheControlContainsNoCache() || m_resourceRequest.cacheControlContainsNoStore( ); | 953 return !canUseResponse(m_response, m_responseTimestamp) || m_resourceRequest .cacheControlContainsNoCache() || m_resourceRequest.cacheControlContainsNoStore( ); |
| 954 } | 954 } |
| 955 | 955 |
| 956 bool Resource::canUseCacheValidator() | 956 bool Resource::canUseCacheValidator() |
| 957 { | 957 { |
| 958 if (isLoading() || errorOccurred()) | 958 if (isLoading() || errorOccurred()) |
| 959 return false; | 959 return false; |
| 960 | 960 |
| 961 if (hasCacheControlNoStoreHeader()) | 961 if (hasCacheControlNoStoreHeader()) |
| 962 return false; | 962 return false; |
| 963 | |
| 964 // Do not revalidate Resource with redirects. https://crbug.com/613971 | |
| 965 if (!redirectChain().isEmpty()) | |
|
Nate Chapin
2016/05/27 17:00:57
How does this interact with canReuseRedirectChain(
hiroshige
2016/05/30 06:28:50
This CL prohibits |Revalidate| for Resource with r
| |
| 966 return false; | |
| 967 | |
| 963 return m_response.hasCacheValidatorFields() || m_resourceRequest.hasCacheVal idatorFields(); | 968 return m_response.hasCacheValidatorFields() || m_resourceRequest.hasCacheVal idatorFields(); |
| 964 } | 969 } |
| 965 | 970 |
| 966 bool Resource::isPurgeable() const | 971 bool Resource::isPurgeable() const |
| 967 { | 972 { |
| 968 return m_data && !m_data->isLocked(); | 973 return m_data && !m_data->isLocked(); |
| 969 } | 974 } |
| 970 | 975 |
| 971 bool Resource::lock() | 976 bool Resource::lock() |
| 972 { | 977 { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1122 case Resource::Media: | 1127 case Resource::Media: |
| 1123 return "Media"; | 1128 return "Media"; |
| 1124 case Resource::Manifest: | 1129 case Resource::Manifest: |
| 1125 return "Manifest"; | 1130 return "Manifest"; |
| 1126 } | 1131 } |
| 1127 ASSERT_NOT_REACHED(); | 1132 ASSERT_NOT_REACHED(); |
| 1128 return "Unknown"; | 1133 return "Unknown"; |
| 1129 } | 1134 } |
| 1130 | 1135 |
| 1131 } // namespace blink | 1136 } // namespace blink |
| OLD | NEW |