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

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

Issue 2615493002: Adding compressed bytes to DRP pingback (Closed)
Patch Set: moving to KB Created 3 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_pingback_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
index 89717995175f366fcae44f36fc833ef283ed0591..4687b6a9399b1e3b96404902f7a5a22ae8bf051b 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
@@ -4,6 +4,8 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.h"
+#include <stdint.h>
+
#include "base/metrics/histogram_macros.h"
#include "base/optional.h"
#include "base/rand_util.h"
@@ -88,6 +90,10 @@ void AddDataToPageloadMetrics(const DataReductionProxyData& request_data,
request->set_effective_connection_type(
protobuf_parser::ProtoEffectiveConnectionTypeFromEffectiveConnectionType(
request_data.effective_connection_type()));
+ request->set_compressed_page_size_kb(
+ static_cast<int>(timing.network_bytes / 1024));
+ request->set_original_page_size_kb(
+ static_cast<int>(timing.original_network_bytes / 1024));
}
// Adds |current_time| as the metrics sent time to |request_data|, and returns

Powered by Google App Engine
This is Rietveld 408576698