OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |
| 6 #define COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 #include "components/data_usage/core/data_use.h" |
| 13 |
| 14 namespace data_usage { |
| 15 |
| 16 class DataUseAmortizer { |
| 17 public: |
| 18 virtual ~DataUseAmortizer() {} |
| 19 |
| 20 // Amortize the given |data_use_sequence|, modifying the elements of |
| 21 // |data_use_sequence| directly. |extra_tx_bytes| and |extra_rx_bytes| are |
| 22 // the byte counts for data usage that is not included in |data_use_sequence|. |
| 23 virtual void Amortize(std::vector<DataUse>* data_use_sequence, |
| 24 int64_t extra_tx_bytes, |
| 25 int64_t extra_rx_bytes) = 0; |
| 26 }; |
| 27 |
| 28 } // namespace data_usage |
| 29 |
| 30 #endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |
OLD | NEW |