Chromium Code Reviews| Index: chrome/browser/predictors/resource_prefetch_predictor.cc |
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc |
| index dcb8b8638b43acbb21e5ee9256a75ac9ffee9e7f..afa66a974aef95d32c6cff09539f77e841e9a2d1 100644 |
| --- a/chrome/browser/predictors/resource_prefetch_predictor.cc |
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc |
| @@ -217,11 +217,12 @@ bool ResourcePrefetchPredictor::IsHandledResourceType( |
| content::ResourceType ResourcePrefetchPredictor::GetResourceType( |
| content::ResourceType resource_type, |
| const std::string& mime_type) { |
| - // Restricts content::RESOURCE_TYPE_{PREFETCH,SUB_RESOURCE} to a small set of |
| - // mime types, because these resource types don't communicate how the |
| + // Restricts content::RESOURCE_TYPE_{PREFETCH,SUB_RESOURCE,XHR} to a small set |
| + // of mime types, because these resource types don't communicate how the |
| // resources will be used. |
| if (resource_type == content::RESOURCE_TYPE_PREFETCH || |
| - resource_type == content::RESOURCE_TYPE_SUB_RESOURCE) { |
| + resource_type == content::RESOURCE_TYPE_SUB_RESOURCE || |
| + resource_type == content::RESOURCE_TYPE_XHR) { |
|
Benoit L
2016/12/01 16:15:21
Can you add an assertion (or a few) in ResourcePre
|
| return GetResourceTypeFromMimeType(mime_type, |
| content::RESOURCE_TYPE_LAST_TYPE); |
| } |