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

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

Issue 1310743003: Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comments and rebase Created 5 years, 2 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
« no previous file with comments | « chrome/renderer/page_load_histograms.cc ('k') | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6a83c75d90e1d177730e5d7c59c59656c22aab9c..0132adde720726bed468cc670b0865b482cb5d44 100644
--- a/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
+++ b/components/data_reduction_proxy/content/browser/content_lofi_decider.cc
@@ -4,6 +4,8 @@
#include "components/data_reduction_proxy/content/browser/content_lofi_decider.h"
+#include "content/public/browser/resource_request_info.h"
+
namespace data_reduction_proxy {
ContentLoFiDecider::ContentLoFiDecider() {}
@@ -11,7 +13,10 @@ ContentLoFiDecider::ContentLoFiDecider() {}
ContentLoFiDecider::~ContentLoFiDecider() {}
bool ContentLoFiDecider::IsUsingLoFiMode(const net::URLRequest& request) const {
- // TODO: will be check of ResourceRequestInfo::IsUsingLoFi
+ const content::ResourceRequestInfo* request_info =
+ content::ResourceRequestInfo::ForRequest(&request);
+ if (request_info)
+ return request_info->IsUsingLoFi();
return false;
}
« no previous file with comments | « chrome/renderer/page_load_histograms.cc ('k') | content/browser/frame_host/navigation_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698