OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/data_reduction_proxy/content/browser/content_lofi_decider.h
" | 5 #include "components/data_reduction_proxy/content/browser/content_lofi_decider.h
" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 bool ContentLoFiDecider::IsClientLoFiImageRequest( | 215 bool ContentLoFiDecider::IsClientLoFiImageRequest( |
216 const net::URLRequest& request) const { | 216 const net::URLRequest& request) const { |
217 const content::ResourceRequestInfo* request_info = | 217 const content::ResourceRequestInfo* request_info = |
218 content::ResourceRequestInfo::ForRequest(&request); | 218 content::ResourceRequestInfo::ForRequest(&request); |
219 return request_info && | 219 return request_info && |
220 request_info->GetResourceType() == content::RESOURCE_TYPE_IMAGE && | 220 request_info->GetResourceType() == content::RESOURCE_TYPE_IMAGE && |
221 (request_info->GetPreviewsState() & content::CLIENT_LOFI_ON); | 221 (request_info->GetPreviewsState() & content::CLIENT_LOFI_ON); |
222 } | 222 } |
223 | 223 |
| 224 bool ContentLoFiDecider::IsClientLoFiAutoReloadRequest( |
| 225 const net::URLRequest& request) const { |
| 226 const content::ResourceRequestInfo* request_info = |
| 227 content::ResourceRequestInfo::ForRequest(&request); |
| 228 return request_info && |
| 229 (request_info->GetPreviewsState() & content::CLIENT_LOFI_AUTO_RELOAD); |
| 230 } |
224 } // namespace data_reduction_proxy | 231 } // namespace data_reduction_proxy |
OLD | NEW |