OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COMPRE
SSION_STATS_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COMPRE
SSION_STATS_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COMPRE
SSION_STATS_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COMPRE
SSION_STATS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Returns the time in milliseconds since epoch that the last update was made | 86 // Returns the time in milliseconds since epoch that the last update was made |
87 // to the daily original and received content lengths. | 87 // to the daily original and received content lengths. |
88 int64_t GetLastUpdateTime(); | 88 int64_t GetLastUpdateTime(); |
89 | 89 |
90 // Resets daily content length statistics. | 90 // Resets daily content length statistics. |
91 void ResetStatistics(); | 91 void ResetStatistics(); |
92 | 92 |
93 // Clears all data saving statistics. | 93 // Clears all data saving statistics. |
94 void ClearDataSavingStatistics(); | 94 void ClearDataSavingStatistics(); |
95 | 95 |
| 96 // Returns the total size of all HTTP content received from the network. |
| 97 int64_t GetHttpReceivedContentLength(); |
| 98 |
| 99 // Returns the value the total original size of all HTTP content received from |
| 100 // the network. |
| 101 int64_t GetHttpOriginalContentLength(); |
| 102 |
96 // Returns a list of all the daily content lengths. | 103 // Returns a list of all the daily content lengths. |
97 ContentLengthList GetDailyContentLengths(const char* pref_name); | 104 ContentLengthList GetDailyContentLengths(const char* pref_name); |
98 | 105 |
99 // Returns aggregate received and original content lengths over the specified | 106 // Returns aggregate received and original content lengths over the specified |
100 // number of days, as well as the time these stats were last updated. | 107 // number of days, as well as the time these stats were last updated. |
101 void GetContentLengths(unsigned int days, | 108 void GetContentLengths(unsigned int days, |
102 int64_t* original_content_length, | 109 int64_t* original_content_length, |
103 int64_t* received_content_length, | 110 int64_t* received_content_length, |
104 int64_t* last_update_time); | 111 int64_t* last_update_time); |
105 | 112 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 base::ThreadChecker thread_checker_; | 276 base::ThreadChecker thread_checker_; |
270 | 277 |
271 base::WeakPtrFactory<DataReductionProxyCompressionStats> weak_factory_; | 278 base::WeakPtrFactory<DataReductionProxyCompressionStats> weak_factory_; |
272 | 279 |
273 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyCompressionStats); | 280 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyCompressionStats); |
274 }; | 281 }; |
275 | 282 |
276 } // namespace data_reduction_proxy | 283 } // namespace data_reduction_proxy |
277 | 284 |
278 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COM
PRESSION_STATS_H_ | 285 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_COM
PRESSION_STATS_H_ |
OLD | NEW |