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

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

Issue 863203009: Store Proxy Servers as proxy servers and not GURLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_usage_stats.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
index 7c1293b431570c4b1d4ebe4b7afbfd7008c57c29..34fc753c086c0549d5436af0c095057b9959d0c9 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
@@ -249,10 +249,12 @@ void DataReductionProxyUsageStats::RecordBypassedBytesHistograms(
content_length);
// If non-empty, |proxy_server.first| is the proxy that this request used.
- if (!data_reduction_proxy_type_info.proxy_servers.first.is_empty()) {
+ if (data_reduction_proxy_type_info.proxy_servers.first.is_valid()
+ && !data_reduction_proxy_type_info.proxy_servers.first.host_port_pair().IsEmpty()) {
bengr 2015/02/04 00:49:26 move && to previous line
tbansal1 2015/02/04 22:49:11 Done.
DataReductionProxyTamperDetection::DetectAndReport(
request.response_info().headers.get(),
- data_reduction_proxy_type_info.proxy_servers.first.SchemeIsSecure(),
+ data_reduction_proxy_type_info.proxy_servers.first.is_https() ||
+ data_reduction_proxy_type_info.proxy_servers.first.is_quic(),
content_length);
}
return;
@@ -268,7 +270,7 @@ void DataReductionProxyUsageStats::RecordBypassedBytesHistograms(
// Now that the data reduction proxy is a best effort proxy, if the effective
// proxy configuration resolves to anything other than direct:// for a URL,
// the data reduction proxy will not be used.
- DCHECK(data_reduction_proxy_type_info.proxy_servers.first.is_empty());
+ DCHECK(!data_reduction_proxy_type_info.proxy_servers.first.is_valid());
if (!request.proxy_server().IsEmpty()) {
RecordBypassedBytes(last_bypass_type_,
DataReductionProxyUsageStats::PROXY_OVERRIDDEN,

Powered by Google App Engine
This is Rietveld 408576698