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) 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 // allow for this differing behavior. | 686 // allow for this differing behavior. |
| 687 // TODO(japhet): Can we get rid of one of these settings? | 687 // TODO(japhet): Can we get rid of one of these settings? |
| 688 if (existingResource->isImage() && !context().allowImage(m_imagesEnabled, ex istingResource->url())) | 688 if (existingResource->isImage() && !context().allowImage(m_imagesEnabled, ex istingResource->url())) |
| 689 return Reload; | 689 return Reload; |
| 690 | 690 |
| 691 // Never use cache entries for downloadToFile / useStreamOnResponse | 691 // Never use cache entries for downloadToFile / useStreamOnResponse |
| 692 // requests. The data will be delivered through other paths. | 692 // requests. The data will be delivered through other paths. |
| 693 if (request.downloadToFile() || request.useStreamOnResponse()) | 693 if (request.downloadToFile() || request.useStreamOnResponse()) |
| 694 return Reload; | 694 return Reload; |
| 695 | 695 |
| 696 // Never reuse opaque responses from a service worker for requests that | |
| 697 // are not no-cors. https://crbug.com/625575 | |
| 698 if (existingResource->response().serviceWorkerResponseType() == WebServiceWo rkerResponseTypeOpaque && request.fetchRequestMode() != WebURLRequest::FetchRequ estModeNoCORS) | |
|
horo
2016/07/28 07:29:00
I think we should also check existingResource->res
hiroshige
2016/08/05 07:53:14
Done.
| |
| 699 return Reload; | |
| 700 | |
| 696 // If resource was populated from a SubstituteData load or data: url, use it . | 701 // If resource was populated from a SubstituteData load or data: url, use it . |
| 697 if (isStaticData) | 702 if (isStaticData) |
| 698 return Use; | 703 return Use; |
| 699 | 704 |
| 700 if (!existingResource->canReuse(request)) | 705 if (!existingResource->canReuse(request)) |
| 701 return Reload; | 706 return Reload; |
| 702 | 707 |
| 703 // Certain requests (e.g., XHRs) might have manually set headers that requir e revalidation. | 708 // Certain requests (e.g., XHRs) might have manually set headers that requir e revalidation. |
| 704 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo ryCache revalidation path assumes a whole bunch | 709 // FIXME: In theory, this should be a Revalidate case. In practice, the Memo ryCache revalidation path assumes a whole bunch |
| 705 // of things about how revalidation works that manual headers violate, so pu nt to Reload instead. | 710 // of things about how revalidation works that manual headers violate, so pu nt to Reload instead. |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1272 visitor->trace(m_context); | 1277 visitor->trace(m_context); |
| 1273 visitor->trace(m_archive); | 1278 visitor->trace(m_archive); |
| 1274 visitor->trace(m_loaders); | 1279 visitor->trace(m_loaders); |
| 1275 visitor->trace(m_nonBlockingLoaders); | 1280 visitor->trace(m_nonBlockingLoaders); |
| 1276 visitor->trace(m_documentResources); | 1281 visitor->trace(m_documentResources); |
| 1277 visitor->trace(m_preloads); | 1282 visitor->trace(m_preloads); |
| 1278 visitor->trace(m_resourceTimingInfoMap); | 1283 visitor->trace(m_resourceTimingInfoMap); |
| 1279 } | 1284 } |
| 1280 | 1285 |
| 1281 } // namespace blink | 1286 } // namespace blink |
| OLD | NEW |