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

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

Issue 1558553002: Lo-Fi snackbar should only be shown for the first q=low response of a page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tbansal comments Created 4 years, 11 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/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 f9983391776cef8decdde25b48d1104ed094fcb9..be967f2fa353e58b7e7a449aa178826fddd31831 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
@@ -202,6 +202,13 @@ void DataReductionProxyNetworkDelegate::OnCompletedInternal(
if (data_reduction_proxy_bypass_stats_)
data_reduction_proxy_bypass_stats_->OnUrlRequestCompleted(request, started);
+ if (data_reduction_proxy_io_data_ && request->response_info().headers &&
+ request->response_headers()->HasHeaderValue(
+ chrome_proxy_header(), chrome_proxy_lo_fi_directive())) {
+ data_reduction_proxy_io_data_->lofi_ui_service()->NotifyLoFiReponseReceived(
+ *request);
+ }
+
// For better accuracy, we use the actual bytes read instead of the length
// specified with the Content-Length header, which may be inaccurate,
// or missing, as is the case with chunked encoding.

Powered by Google App Engine
This is Rietveld 408576698