Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics.h |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1c82333de55f889575fdc5a9471d729362f57909 |
--- /dev/null |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2014 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_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_STATISTICS_H_ |
+#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_STATISTICS_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/values.h" |
+ |
+namespace base { |
+class ListValue; |
+} |
+ |
+namespace data_reduction_proxy { |
+// This class collects the statistics of data reduction proxy. The statistics |
bengr
2014/10/17 23:40:27
Add a blank line above.
hush (inactive)
2014/10/18 01:54:29
Done.
|
+// are stored in a name-value pair map. It has a default no-op implementation. |
+class DataReductionProxyStatistics { |
+ public: |
+ DataReductionProxyStatistics(); |
+ virtual ~DataReductionProxyStatistics(); |
+ |
+ // Gets the int64 stats corresponding to |stats_name|. |
+ virtual int64 GetInt64(const char* stats_name); |
+ // Sets the int64 stats corresponding to |stats_name|. |
bengr
2014/10/17 23:40:27
Add a blank line between each of these methods.
hush (inactive)
2014/10/18 01:54:29
Done.
|
+ virtual void SetInt64(const char* stats_name, int64 stats_value); |
+ // Gets the list value corresponding to |stats_name|. |
+ virtual base::ListValue* GetList(const char* stats_name); |
+ // Writes the stats to some persistence object depending on implementation. |
+ virtual void WriteStats(); |
+ |
+ private: |
+ scoped_ptr<base::ListValue> list_value_; |
+}; |
+ |
+} // namespace data_reduction_proxy |
+ |
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_STATISTICS_H_ |