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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc

Issue 1463583003: Move adding Lo-Fi directives from DRPRequestOptions to ContentLoFiDecider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing tbansal comments Created 5 years, 1 month 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/core/browser/data_reduction_proxy_network_delegate.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
index 9b3a9b6a23e252f9884878b991777c82316accb0..5fd509ff978512f41f6921e82acd13f3b0beeff2 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc
@@ -174,12 +174,11 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendProxyHeadersInternal(
net::HttpRequestHeaders* headers) {
DCHECK(data_reduction_proxy_config_);
- bool is_using_lofi_mode = false;
-
if (data_reduction_proxy_io_data_ &&
data_reduction_proxy_io_data_->lofi_decider() && request) {
LoFiDecider* lofi_decider = data_reduction_proxy_io_data_->lofi_decider();
- is_using_lofi_mode = lofi_decider->IsUsingLoFiMode(*request);
+ bool is_using_lofi_mode =
+ lofi_decider->MaybeAddLoFiDirectiveToHeaders(*request, headers);
if ((request->load_flags() & net::LOAD_MAIN_FRAME) != 0) {
// TODO(megjablon): Need to switch to per page.
@@ -190,7 +189,7 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendProxyHeadersInternal(
if (data_reduction_proxy_request_options_) {
data_reduction_proxy_request_options_->MaybeAddRequestHeader(
- request, proxy_info.proxy_server(), headers, is_using_lofi_mode);
+ request, proxy_info.proxy_server(), headers);
}
}

Powered by Google App Engine
This is Rietveld 408576698