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

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: move DRP parts to https://codereview.chromium.org/1363673004/ 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 a6ebb262139a132c1c87ce54264dfadc4ce784b6..719648f559f3f0b671fc65a1c8e31a84e0be7007 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
@@ -15,8 +15,12 @@ ContentDataReductionProxyLoFiHelper::~ContentDataReductionProxyLoFiHelper() {}
bool ContentDataReductionProxyLoFiHelper::IsLoFi(
net::URLRequest* request) const {
- // TODO: return IsLoFi from ResourceRequestInfo.
- return false;
+ const content::ResourceRequestInfo* request_info =
+ content::ResourceRequestInfo::ForRequest(request);
mmenke 2015/09/29 16:35:57 ResourceRequestInfo will never exist at this point
megjablon 2015/09/29 21:20:07 This is called from DRPNetworkDelegate::OnBeforeSe
mmenke 2015/09/30 19:33:41 Sorry, I thought that this is what was being calle
+ if (request_info)
+ return request_info->IsLoFi();
+ else
+ return false;
}
} // namespace data_reduction_roxy

Powered by Google App Engine
This is Rietveld 408576698