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

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

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke comments Created 5 years, 3 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_data_reduction_proxy_lofi_helper.cc
diff --git a/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc b/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
index 8748594a9390941584b361cc907a62f763b1d4ba..b19cd1084322a7ddb28fedc5e9b6015921070598 100644
--- a/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
+++ b/components/data_reduction_proxy/content/browser/content_data_reduction_proxy_lofi_helper.cc
@@ -16,9 +16,13 @@ ContentDataReductionProxyLoFiHelper::~ContentDataReductionProxyLoFiHelper() {}
bool ContentDataReductionProxyLoFiHelper::IsUsingLoFi(
const net::URLRequest* request) const {
- // TODO: will be check of IsLoFi ResourceRequestInfo &&
- // (params::IsLoFiOnViaFlags() ||
- // params::IsIncludedInLoFiEnabledFieldTrial())
+ const content::ResourceRequestInfo* request_info =
+ content::ResourceRequestInfo::ForRequest(request);
+ if (request_info) {
+ return request_info->IsUsingLoFi() &&
+ (params::IsLoFiOnViaFlags() ||
+ params::IsIncludedInLoFiEnabledFieldTrial());
mmenke 2015/09/30 19:33:41 optional: This is kinda weird. IsUsingLoFi can r
megjablon 2015/09/30 22:14:08 Done.
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698