Index: base/metrics/metric_sample.h |
diff --git a/base/metrics/metric_sample.h b/base/metrics/metric_sample.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0256df9afcf5334717f013a3bb70da37c424e4a3 |
--- /dev/null |
+++ b/base/metrics/metric_sample.h |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 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 BASE_METRICS_METRIC_SAMPLE_H_ |
+#define BASE_METRICS_METRIC_SAMPLE_H_ |
+ |
+#include <string> |
+ |
+#include "base/base_export.h" |
+ |
+using std::string; |
+ |
+namespace base { |
+class BASE_EXPORT MetricSample { |
gauravsh
2014/04/11 23:50:51
I would think about adding comments for these clas
|
+ public: |
+ enum SampleType { |
+ CRASH, |
+ HISTOGRAM, |
+ LINEAR_HISTOGRAM, |
+ SPARSE_HISTOGRAM, |
+ USER_ACTION |
+ }; |
+ explicit MetricSample(SampleType t); |
+ virtual ~MetricSample(); |
+ virtual bool isValid() const; |
gauravsh
2014/04/11 23:50:51
NIT: newline before this.
gauravsh
2014/04/11 23:50:51
function names (except accessors) start uppsercase
|
+ SampleType type(); |
gauravsh
2014/04/11 23:50:51
This can be a const function.
|
+ string name() const; |
+ virtual string toString() const; |
+ |
+ protected: |
+ SampleType type_; |
+ string name_; |
+}; |
+} // namespace base |
+#endif // BASE_METRICS_METRIC_SAMPLE_H_ |