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

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

Issue 2365823002: Improve logging of DRP.ConfigService.HTTPRequests (Closed)
Patch Set: Rebased, Addressed megjablon comments Created 4 years, 3 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 bfa1f0621751e6a9ec80d2fac497b919b0ae1984..ed2397f1a2c7aeba9bcdfbbf43ed90d5ce28eac0 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
@@ -180,8 +180,14 @@ void OnResolveProxyHandler(const GURL& url,
&data_reduction_proxy_info);
if (data_saver_proxy_used)
result->OverrideProxyList(data_reduction_proxy_info.proxy_list());
+
+ // The |data_reduction_proxy_config| must be valid otherwise the proxy
+ // cannot be used.
+ DCHECK(data_reduction_proxy_config.is_valid() || !data_saver_proxy_used);
+
if (config->enabled_by_user_and_reachable() && url.SchemeIsHTTPOrHTTPS() &&
- !url.SchemeIsCryptographic() && !net::IsLocalhost(url.host())) {
+ !url.SchemeIsCryptographic() && !net::IsLocalhost(url.host()) &&
+ (!data_reduction_proxy_config.is_valid() || data_saver_proxy_used)) {
UMA_HISTOGRAM_BOOLEAN("DataReductionProxy.ConfigService.HTTPRequests",
data_saver_proxy_used);
}

Powered by Google App Engine
This is Rietveld 408576698