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

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

Issue 1933653004: Reset the Lo-Fi main frame state when there is a new main frame request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 cbf79c38e874f14cf6d75a1dd84826462e67a478..a178b7a334c8fde68921afcc6a587c878284d478 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
@@ -153,6 +153,15 @@ DataReductionProxyNetworkDelegate::SessionNetworkStatsInfoToValue() const {
return dict;
}
+void DataReductionProxyNetworkDelegate::OnBeforeURLRequestInternal(
+ net::URLRequest* request,
+ const net::CompletionCallback& callback,
+ GURL* new_url) {
+ if ((request->load_flags() & net::LOAD_MAIN_FRAME)) {
tbansal1 2016/05/04 05:16:57 braces not needed.
tbansal1 2016/05/04 05:16:57 Is request guaranteed to be non-null here? I think
megjablon 2016/05/06 22:13:00 Yes, see https://code.google.com/p/chromium/codese
megjablon 2016/05/06 22:13:00 Done.
+ data_reduction_proxy_io_data_->SetLoFiModeActiveOnMainFrame(false);
+ }
+}
+
void DataReductionProxyNetworkDelegate::OnBeforeSendProxyHeadersInternal(
net::URLRequest* request,
const net::ProxyInfo& proxy_info,
@@ -170,7 +179,6 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendProxyHeadersInternal(
data_reduction_proxy_config_);
if ((request->load_flags() & net::LOAD_MAIN_FRAME)) {
- // TODO(megjablon): Need to switch to per page.
tbansal1 2016/05/04 01:46:23 Why is this TODO gone? Seems like the Lo-Fi state
megjablon 2016/05/04 03:02:44 This isn't going to be fixable. This TODO was adde
tbansal1 2016/05/04 05:16:57 Acknowledged.
data_reduction_proxy_io_data_->SetLoFiModeActiveOnMainFrame(
is_using_lofi_mode);
}

Powered by Google App Engine
This is Rietveld 408576698