Index: components/data_usage/core/data_use_amortizer.h |
diff --git a/components/data_usage/core/data_use_amortizer.h b/components/data_usage/core/data_use_amortizer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1a392b8b6d504783ae7179f8296031bede2061dd |
--- /dev/null |
+++ b/components/data_usage/core/data_use_amortizer.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |
+#define COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |
+ |
+#include <stdint.h> |
+ |
+#include <vector> |
+ |
+#include "components/data_usage/core/data_use.h" |
+ |
+namespace data_usage { |
+ |
+class DataUseAmortizer { |
+ public: |
+ virtual ~DataUseAmortizer() {} |
+ |
+ // Amortize the given |data_use_sequence|, modifying the elements of |
+ // |data_use_sequence| directly. |extra_tx_bytes| and |extra_rx_bytes| are |
+ // the byte counts for data usage that is not included in |data_use_sequence|. |
+ virtual void Amortize(std::vector<DataUse>* data_use_sequence, |
+ int64_t extra_tx_bytes, |
+ int64_t extra_rx_bytes) = 0; |
+}; |
+ |
+} // namespace data_usage |
+ |
+#endif // COMPONENTS_DATA_USAGE_CORE_DATA_USE_AMORTIZER_H_ |