Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: components/data_reduction_proxy/content/browser/content_lofi_decider.cc

Issue 2873793002: Record Data Savings for Client-Side LoFi (Closed)
Patch Set: fix crash in DRPNetworkDelegate when lofi_ui_service is null. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/content/browser/content_lofi_decider.cc
diff --git a/components/data_reduction_proxy/content/browser/content_lofi_decider.cc b/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
index d24fab4bb500569f6837daf9d9ce16846a5bb0e9..dc203b99319c979c4bf6ea15c64da066277bc8e5 100644
--- a/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
+++ b/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
@@ -221,4 +221,11 @@ bool ContentLoFiDecider::IsClientLoFiImageRequest(
(request_info->GetPreviewsState() & content::CLIENT_LOFI_ON);
}
+bool ContentLoFiDecider::IsClientLoFiAutoReloadRequest(
+ const net::URLRequest& request) const {
+ const content::ResourceRequestInfo* request_info =
+ content::ResourceRequestInfo::ForRequest(&request);
+ return request_info &&
+ (request_info->GetPreviewsState() & content::CLIENT_LOFI_AUTO_RELOAD);
+}
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698