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

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

Issue 1576493002: Change the Lo-Fi snackbar strings for Lo-Fi preview pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@showLoFiSnackbarNative
Patch Set: newt 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 0222d8cf4995ffda51aac50cb75f39bdf99e4fb7..ba064b01b5f30383bfc55afd54578c5e65b06922 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
@@ -206,7 +206,14 @@ void DataReductionProxyNetworkDelegate::OnCompletedInternal(
request->response_headers()->HasHeaderValue(
chrome_proxy_header(), chrome_proxy_lo_fi_directive())) {
data_reduction_proxy_io_data_->lofi_ui_service()->OnLoFiReponseReceived(
- *request);
+ *request, false);
+ } else if (data_reduction_proxy_io_data_ &&
+ request->response_info().headers &&
+ request->response_headers()->HasHeaderValue(
+ chrome_proxy_header(),
+ chrome_proxy_lo_fi_preview_directive())) {
+ data_reduction_proxy_io_data_->lofi_ui_service()->OnLoFiReponseReceived(
+ *request, true);
}
// For better accuracy, we use the actual bytes read instead of the length

Powered by Google App Engine
This is Rietveld 408576698