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

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

Issue 2776583002: Fix recording of DataReductionProxy.ConfigService.HTTPRequests (Closed)
Patch Set: sclittle comments Created 3 years, 9 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_delegate.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
index a9c344e187bcccc1ea2fc8daf88f0b649ccb4cb7..52617e082c597700b28cfd4cbb392274cd57f987 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc
@@ -99,7 +99,7 @@ void DataReductionProxyDelegate::OnResolveProxy(
!config_->secure_proxy_allowed(), proxies_for_http);
OnResolveProxyHandler(url, method, proxy_config,
- proxy_service.proxy_retry_info(), config_, io_data_,
+ proxy_service.proxy_retry_info(), *config_, io_data_,
result);
if (!first_data_saver_request_recorded_ && !result->is_empty() &&
@@ -277,12 +277,11 @@ void OnResolveProxyHandler(
const std::string& method,
const net::ProxyConfig& proxy_config,
const net::ProxyRetryInfoMap& proxy_retry_info,
- const DataReductionProxyConfig* data_reduction_proxy_config,
+ const DataReductionProxyConfig& data_reduction_proxy_config,
DataReductionProxyIOData* io_data,
net::ProxyInfo* result) {
- DCHECK(data_reduction_proxy_config);
DCHECK(result->is_empty() || result->is_direct() ||
- !data_reduction_proxy_config->IsDataReductionProxy(
+ !data_reduction_proxy_config.IsDataReductionProxy(
result->proxy_server(), NULL));
if (!util::EligibleForDataReductionProxy(*result, url, method))
@@ -306,12 +305,12 @@ void OnResolveProxyHandler(
// The |proxy_config| must be valid otherwise the proxy cannot be used.
DCHECK(proxy_config.is_valid() || !data_saver_proxy_used);
- if (data_reduction_proxy_config->enabled_by_user_and_reachable() &&
- url.SchemeIsHTTPOrHTTPS() && !url.SchemeIsCryptographic() &&
- !net::IsLocalhost(url.host()) &&
- (!proxy_config.is_valid() || data_saver_proxy_used)) {
- UMA_HISTOGRAM_BOOLEAN("DataReductionProxy.ConfigService.HTTPRequests",
- data_saver_proxy_used);
+ if (data_reduction_proxy_config.enabled_by_user_and_reachable() &&
+ url.SchemeIs(url::kHttpScheme) && !net::IsLocalhost(url.host_piece()) &&
+ !params::IsIncludedInHoldbackFieldTrial()) {
+ UMA_HISTOGRAM_BOOLEAN(
+ "DataReductionProxy.ConfigService.HTTPRequests",
+ !data_reduction_proxy_config.GetProxiesForHttp().empty());
}
}

Powered by Google App Engine
This is Rietveld 408576698