| 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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 priority = kResourceLoadPriorityLow; | 208 priority = kResourceLoadPriorityLow; |
| 209 } else if (speculative_preload_type == | 209 } else if (speculative_preload_type == |
| 210 FetchParameters::SpeculativePreloadType::kInDocument && | 210 FetchParameters::SpeculativePreloadType::kInDocument && |
| 211 image_fetched_) { | 211 image_fetched_) { |
| 212 // Speculative preload is used as a signal for scripts at the bottom of | 212 // Speculative preload is used as a signal for scripts at the bottom of |
| 213 // the document. | 213 // the document. |
| 214 priority = kResourceLoadPriorityMedium; | 214 priority = kResourceLoadPriorityMedium; |
| 215 } | 215 } |
| 216 } else if (FetchParameters::kLazyLoad == defer_option) { | 216 } else if (FetchParameters::kLazyLoad == defer_option) { |
| 217 priority = kResourceLoadPriorityVeryLow; | 217 priority = kResourceLoadPriorityVeryLow; |
| 218 } else if (resource_request.GetRequestContext() == |
| 219 WebURLRequest::kRequestContextBeacon || |
| 220 resource_request.GetRequestContext() == |
| 221 WebURLRequest::kRequestContextPing || |
| 222 resource_request.GetRequestContext() == |
| 223 WebURLRequest::kRequestContextCSPReport) { |
| 224 priority = kResourceLoadPriorityVeryLow; |
| 218 } | 225 } |
| 219 | 226 |
| 220 // A manually set priority acts as a floor. This is used to ensure that | 227 // A manually set priority acts as a floor. This is used to ensure that |
| 221 // synchronous requests are always given the highest possible priority, as | 228 // synchronous requests are always given the highest possible priority, as |
| 222 // well as to ensure that there isn't priority churn if images move in and out | 229 // well as to ensure that there isn't priority churn if images move in and out |
| 223 // of the viewport, or are displayed more than once, both in and out of the | 230 // of the viewport, or are displayed more than once, both in and out of the |
| 224 // viewport. | 231 // viewport. |
| 225 return std::max(priority, resource_request.Priority()); | 232 return std::max(priority, resource_request.Priority()); |
| 226 } | 233 } |
| 227 | 234 |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 visitor->Trace(archive_); | 1686 visitor->Trace(archive_); |
| 1680 visitor->Trace(loaders_); | 1687 visitor->Trace(loaders_); |
| 1681 visitor->Trace(non_blocking_loaders_); | 1688 visitor->Trace(non_blocking_loaders_); |
| 1682 visitor->Trace(document_resources_); | 1689 visitor->Trace(document_resources_); |
| 1683 visitor->Trace(preloads_); | 1690 visitor->Trace(preloads_); |
| 1684 visitor->Trace(matched_preloads_); | 1691 visitor->Trace(matched_preloads_); |
| 1685 visitor->Trace(resource_timing_info_map_); | 1692 visitor->Trace(resource_timing_info_map_); |
| 1686 } | 1693 } |
| 1687 | 1694 |
| 1688 } // namespace blink | 1695 } // namespace blink |
| OLD | NEW |