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

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

Issue 2664983002: Fixing redirect DataReductionProxyNewtorkDelegate behavior (Closed)
Patch Set: typo Created 3 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 7c1fda148593f4ab1cbf520e310dfd460c82c366..fe6ac024d4190e4d848d55b2edf5dc6b4bfb3425 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
@@ -205,7 +205,7 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal(
DCHECK(data_reduction_proxy_config_);
DCHECK(request);
- // If this is after a redirect, reset |request|'s DataReductionProxyData.
+ // Reset |request|'s DataReductionProxyData.
DataReductionProxyData::ClearData(request);
if (params::IsIncludedInHoldbackFieldTrial()) {
@@ -278,6 +278,14 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal(
lofi_decider->MaybeSetIgnorePreviewsBlacklistDirective(headers);
}
+void DataReductionProxyNetworkDelegate::OnBeforeRedirectInternal(
+ net::URLRequest* request,
+ const GURL& new_location) {
+ // Since this is after a redirect response, reset |request|'s
+ // DataReductionProxyData.
+ DataReductionProxyData::ClearData(request);
+}
+
void DataReductionProxyNetworkDelegate::OnCompletedInternal(
net::URLRequest* request,
bool started) {

Powered by Google App Engine
This is Rietveld 408576698