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

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

Issue 2592783002: Move session network stats from IO to UI (Closed)
Patch Set: Created 4 years 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_test_utils.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
index d19e4c03bb9eb0061cf720d3034a553a507cfd63..b163408e5081a52e3957269ee5844753240372c4 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
@@ -226,6 +226,8 @@ TestDataReductionProxyIOData::TestDataReductionProxyIOData(
: DataReductionProxyIOData(),
service_set_(false),
pingback_reporting_fraction_(0.0f),
+ original_content_length_(0),
+ actual_content_length_(0),
test_request_options_(request_options.get()) {
io_task_runner_ = task_runner;
ui_task_runner_ = task_runner;
@@ -257,6 +259,20 @@ void TestDataReductionProxyIOData::SetDataReductionProxyService(
service_set_ = true;
}
+void TestDataReductionProxyIOData::UpdateContentLengths(
+ int64_t data_used,
+ int64_t original_size,
+ bool data_reduction_proxy_enabled,
+ DataReductionProxyRequestType request_type,
+ const scoped_refptr<DataUseGroup>& data_usage_source,
+ const std::string& mime_type) {
+ original_content_length_ += original_size;
+ actual_content_length_ += data_used;
+ DataReductionProxyIOData::UpdateContentLengths(
+ data_used, original_size, data_reduction_proxy_enabled, request_type,
+ data_usage_source, mime_type);
+}
+
TestDataStore::TestDataStore() {}
TestDataStore::~TestDataStore() {}

Powered by Google App Engine
This is Rietveld 408576698