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

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

Issue 1702253002: Log more data reduction proxy config service UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, use boolean histogram Created 4 years, 10 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_config_service_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
index 8c6067c59f184389dd012e6c892c9b24f1dacec1..96d8647e94857b9d88b9b0ad65270f703716b55a 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc
@@ -27,6 +27,7 @@
#include "components/data_reduction_proxy/proto/client_config.pb.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
+#include "net/base/load_timing_info.h"
#include "net/base/net_errors.h"
#include "net/base/url_util.h"
#include "net/http/http_request_headers.h"
@@ -232,7 +233,8 @@ void DataReductionProxyConfigServiceClient::ApplySerializedConfig(
bool DataReductionProxyConfigServiceClient::ShouldRetryDueToAuthFailure(
const net::HttpRequestHeaders& request_headers,
const net::HttpResponseHeaders* response_headers,
- const net::HostPortPair& proxy_server) {
+ const net::HostPortPair& proxy_server,
+ const net::LoadTimingInfo& load_timing_info) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(response_headers);
if (config_->IsDataReductionProxy(proxy_server, nullptr)) {
@@ -269,6 +271,13 @@ bool DataReductionProxyConfigServiceClient::ShouldRetryDueToAuthFailure(
previous_request_failed_authentication_ = true;
InvalidateConfig();
RetrieveConfig();
+
+ if (!load_timing_info.request_start.is_null()) {
+ UMA_HISTOGRAM_TIMES(
+ "DataReductionProxy.ConfigService.AuthFailure.LatencyPenalty",
+ base::TimeTicks::Now() - load_timing_info.request_start);
+ }
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698