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

Side by Side Diff: base/metrics/histogram_base.h

Issue 137623002: Let MetricsService know about some Android Activities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_METRICS_HISTOGRAM_BASE_H_ 5 #ifndef BASE_METRICS_HISTOGRAM_BASE_H_
6 #define BASE_METRICS_HISTOGRAM_BASE_H_ 6 #define BASE_METRICS_HISTOGRAM_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class BASE_EXPORT HistogramBase { 49 class BASE_EXPORT HistogramBase {
50 public: 50 public:
51 typedef int Sample; // Used for samples. 51 typedef int Sample; // Used for samples.
52 typedef subtle::Atomic32 AtomicCount; // Used to count samples. 52 typedef subtle::Atomic32 AtomicCount; // Used to count samples.
53 typedef int32 Count; // Used to manipulate counts in temporaries. 53 typedef int32 Count; // Used to manipulate counts in temporaries.
54 54
55 static const Sample kSampleType_MAX; // INT_MAX 55 static const Sample kSampleType_MAX; // INT_MAX
56 56
57 enum Flags { 57 enum Flags {
58 kNoFlags = 0, 58 kNoFlags = 0,
59 kUmaTargetedHistogramFlag = 0x1, // Histogram should be UMA uploaded.
60 59
61 // Indicate that the histogram was pickled to be sent across an IPC Channel. 60 // Histogram should be UMA uploaded.
62 // If we observe this flag on a histogram being aggregated into after IPC, 61 kUmaTargetedHistogramFlag = 0x1,
63 // then we are running in a single process mode, and the aggregation should 62
64 // not take place (as we would be aggregating back into the source 63 // Indicates that this is a stability histogram. This flag exists to specify
65 // histogram!). 64 // which histograms should be included in the initial stability log. Please
65 // refer to |MetricsService::PrepareInitialStabilityLog|.
66 kUmaStabilityHistogramFlag = kUmaTargetedHistogramFlag | 0x2,
67
68 // Indicates that the histogram was pickled to be sent across an IPC
69 // Channel. If we observe this flag on a histogram being aggregated into
70 // after IPC, then we are running in a single process mode, and the
71 // aggregation should not take place (as we would be aggregating back into
72 // the source histogram!).
66 kIPCSerializationSourceFlag = 0x10, 73 kIPCSerializationSourceFlag = 0x10,
67 74
68 // Only for Histogram and its sub classes: fancy bucket-naming support. 75 // Only for Histogram and its sub classes: fancy bucket-naming support.
69 kHexRangePrintingFlag = 0x8000, 76 kHexRangePrintingFlag = 0x8000,
70 }; 77 };
71 78
72 // Histogram data inconsistency types. 79 // Histogram data inconsistency types.
73 enum Inconsistency { 80 enum Inconsistency {
74 NO_INCONSISTENCIES = 0x0, 81 NO_INCONSISTENCIES = 0x0,
75 RANGE_CHECKSUM_ERROR = 0x1, 82 RANGE_CHECKSUM_ERROR = 0x1,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 private: 168 private:
162 const std::string histogram_name_; 169 const std::string histogram_name_;
163 int32 flags_; 170 int32 flags_;
164 171
165 DISALLOW_COPY_AND_ASSIGN(HistogramBase); 172 DISALLOW_COPY_AND_ASSIGN(HistogramBase);
166 }; 173 };
167 174
168 } // namespace base 175 } // namespace base
169 176
170 #endif // BASE_METRICS_HISTOGRAM_BASE_H_ 177 #endif // BASE_METRICS_HISTOGRAM_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698