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 a6fa327ebc7a8fa126a65d6f6b510fd9283df16d..d955ef42b4a00bf9f273a51dc55bc50ab6129b86 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 |
@@ -229,20 +229,24 @@ void DataReductionProxyNetworkDelegate::OnBeforeURLRequestInternal( |
} |
} |
void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal( |
net::URLRequest* request, |
const net::ProxyInfo& proxy_info, |
const net::ProxyRetryInfoMap& proxy_retry_info, |
net::HttpRequestHeaders* headers) { |
DCHECK(data_reduction_proxy_config_); |
DCHECK(request); |
+ |
+ // If this is after a redirect, reset |request|'s DataReductionProxyData. |
+ DataReductionProxyData::ClearData(request); |
+ |
if (params::IsIncludedInHoldbackFieldTrial()) { |
if (!WasEligibleWithoutHoldback(*request, proxy_info, proxy_retry_info)) |
return; |
// For the holdback field trial, still log UMA as if the proxy was used. |
DataReductionProxyData* data = |
DataReductionProxyData::GetDataAndCreateIfNecessary(request); |
if (data) |
data->set_used_data_reduction_proxy(true); |
return; |
} |
@@ -258,21 +262,21 @@ void DataReductionProxyNetworkDelegate::OnBeforeSendHeadersInternal( |
} |
// Retrieves DataReductionProxyData from a request, creating a new instance |
// if needed. |
DataReductionProxyData* data = |
DataReductionProxyData::GetDataAndCreateIfNecessary(request); |
if (data) { |
data->set_used_data_reduction_proxy(true); |
data->set_session_key( |
data_reduction_proxy_request_options_->GetSecureSession()); |
- data->set_original_request_url(request->original_url()); |
+ data->set_request_url(request->url()); |
if ((request->load_flags() & net::LOAD_MAIN_FRAME_DEPRECATED) && |
request->context()->network_quality_estimator()) { |
data->set_effective_connection_type(request->context() |
->network_quality_estimator() |
->GetEffectiveConnectionType()); |
} |
} |
if (data_reduction_proxy_io_data_ && |
data_reduction_proxy_io_data_->lofi_decider()) { |