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

Unified Diff: components/metrics/persisted_logs_metrics.h

Issue 2588873002: Delegate PersistedLogs metrics recording (Closed)
Patch Set: Histogram description Created 4 years 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
Index: components/metrics/persisted_logs_metrics.h
diff --git a/components/metrics/persisted_logs_metrics.h b/components/metrics/persisted_logs_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..b761cb4d9001f240c8a6a0058207f9a3a36f7fb7
--- /dev/null
+++ b/components/metrics/persisted_logs_metrics.h
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
rkaplow 2016/12/19 21:44:33 nit 2016
Steven Holte 2016/12/19 21:53:12 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_METRICS_PERSISTED_LOGS_METRICS_H_
+#define COMPONENTS_METRICS_PERSISTED_LOGS_METRICS_H_
+
+#include "base/macros.h"
+#include "components/metrics/persisted_logs.h"
+
+namespace metrics {
+
+// Maintains a list of unsent logs that are written and restored from disk.
rkaplow 2016/12/19 21:44:33 fix comment
Steven Holte 2016/12/19 21:53:12 Done.
rkaplow 2016/12/19 21:55:09 Did the impl but missed the base here
+class PersistedLogsMetrics {
+ public:
+ PersistedLogsMetrics() {}
+ ~PersistedLogsMetrics() {}
+
+ virtual PersistedLogs::LogReadStatus RecordLogReadStatus(
+ PersistedLogs::LogReadStatus status) = 0;
+
+ virtual void RecordCompressionRatio(
+ size_t compressed_size, size_t original_size) {}
+
+ virtual void RecordDroppedLogSize(size_t size) {}
+
+ virtual void RecordDroppedLogsNum(int dropped_logs_num) {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PersistedLogsMetrics);
+};
+
+} // namespace metrics
+
+#endif // COMPONENTS_METRICS_PERSISTED_LOGS_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698