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

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

Issue 2257533003: Adding a previews object, PreviewsDataSavings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr comment Created 4 years, 3 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4405aa624791fe7dfa4e323a678b4536bf766f00..3dfcf86612a6573dac033676c81e367519035995 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
@@ -36,43 +36,45 @@ namespace data_reduction_proxy {
class DataReductionProxyService;
class DataUsageBucket;
class DataUseGroup;
class PerSiteDataUsage;
// Data reduction proxy delayed pref service reduces the number calls to pref
// service by storing prefs in memory and writing to the given PrefService after
// |delay| amount of time. If |delay| is zero, the delayed pref service writes
// directly to the PrefService and does not store the prefs in memory. All
// prefs must be stored and read on the UI thread.
-class DataReductionProxyCompressionStats : public DataSavingsRecorder {
+class DataReductionProxyCompressionStats {
public:
typedef base::ScopedPtrHashMap<std::string, std::unique_ptr<PerSiteDataUsage>>
SiteUsageMap;
// Collects and store data usage and compression statistics. Basic data usage
// stats are stored in browser preferences. More detailed stats broken down
// by site and internet type are stored in |DataReductionProxyStore|.
//
// To store basic stats, it constructs a data reduction proxy delayed pref
// service object using |pref_service|. Writes prefs to |pref_service| after
// |delay| and stores them in |pref_map_| and |list_pref_map| between writes.
// If |delay| is zero, writes directly to the PrefService and does not store
// in the maps.
DataReductionProxyCompressionStats(DataReductionProxyService* service,
PrefService* pref_service,
const base::TimeDelta& delay);
~DataReductionProxyCompressionStats();
- // DataSavingsRecorder implementation:
+ // Records detailed data usage broken down by connection type and domain.
+ // Assumes that the |data_used| has been recoreded by previous calls to
+ // UpdateContentLengths.
void UpdateDataSavings(const std::string& data_usage_host,
int64_t data_used,
- int64_t original_size) override;
+ int64_t original_size);
// Records detailed data usage broken down by connection type and domain. Also
// records daily data savings statistics to prefs and reports data savings
// UMA. |compressed_size| and |original_size| are measured in bytes.
void UpdateContentLengths(int64_t compressed_size,
int64_t original_size,
bool data_reduction_proxy_enabled,
DataReductionProxyRequestType request_type,
const scoped_refptr<DataUseGroup>& data_use_group,
const std::string& mime_type);
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698