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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h

Issue 2592783002: Move session network stats from IO to UI (Closed)
Patch Set: tbansal nits 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_compression_stats.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h
index 236501fc82f839ae4ad6739a86469eb85ff78558..eca1e2540bdf1ffee5048f7098930d97cda0998a 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h
@@ -79,10 +79,15 @@ class DataReductionProxyCompressionStats {
const scoped_refptr<DataUseGroup>& data_use_group,
const std::string& mime_type);
- // Creates a |Value| summary of the persistent state of the network session.
+ // Creates a |Value| summary of the persistent state of the network
+ // statistics.
// Must be called on the UI thread.
std::unique_ptr<base::Value> HistoricNetworkStatsInfoToValue();
+ // Creates a |Value| summary of the the session network statistics.
+ // Must be called on the UI thread.
+ std::unique_ptr<base::Value> SessionNetworkStatsInfoToValue() const;
+
// Returns the time in milliseconds since epoch that the last update was made
// to the daily original and received content lengths.
int64_t GetLastUpdateTime();
@@ -269,6 +274,12 @@ class DataReductionProxyCompressionStats {
// persisted to storage.
bool data_usage_map_is_dirty_;
+ // Total size of all content that has been received over the network.
+ int64_t session_total_received_;
+
+ // Total original size of all content before it was proxied.
+ int64_t session_total_original_;
+
// Tracks state of loading data usage from storage.
CurrentDataUsageLoadStatus current_data_usage_load_status_;

Powered by Google App Engine
This is Rietveld 408576698