OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chromecast/browser/metrics/external_metrics.h" | 5 #include "chromecast/browser/metrics/external_metrics.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 case ::metrics::MetricSample::HISTOGRAM: | 122 case ::metrics::MetricSample::HISTOGRAM: |
123 if (!CheckValues(sample.name(), sample.min(), sample.max(), | 123 if (!CheckValues(sample.name(), sample.min(), sample.max(), |
124 sample.bucket_count())) { | 124 sample.bucket_count())) { |
125 DLOG(ERROR) << "Invalid histogram: " << sample.name(); | 125 DLOG(ERROR) << "Invalid histogram: " << sample.name(); |
126 break; | 126 break; |
127 } | 127 } |
128 UMA_HISTOGRAM_CUSTOM_COUNTS_NO_CACHE(sample.name(), | 128 UMA_HISTOGRAM_CUSTOM_COUNTS_NO_CACHE(sample.name(), |
129 sample.sample(), | 129 sample.sample(), |
130 sample.min(), | 130 sample.min(), |
131 sample.max(), | 131 sample.max(), |
132 sample.bucket_count()); | 132 sample.bucket_count(), |
| 133 1); |
133 break; | 134 break; |
134 case ::metrics::MetricSample::LINEAR_HISTOGRAM: | 135 case ::metrics::MetricSample::LINEAR_HISTOGRAM: |
135 if (!CheckLinearValues(sample.name(), sample.max())) { | 136 if (!CheckLinearValues(sample.name(), sample.max())) { |
136 DLOG(ERROR) << "Invalid linear histogram: " << sample.name(); | 137 DLOG(ERROR) << "Invalid linear histogram: " << sample.name(); |
137 break; | 138 break; |
138 } | 139 } |
139 UMA_HISTOGRAM_ENUMERATION_NO_CACHE( | 140 UMA_HISTOGRAM_ENUMERATION_NO_CACHE( |
140 sample.name(), sample.sample(), sample.max()); | 141 sample.name(), sample.sample(), sample.max()); |
141 break; | 142 break; |
142 case ::metrics::MetricSample::SPARSE_HISTOGRAM: | 143 case ::metrics::MetricSample::SPARSE_HISTOGRAM: |
(...skipping 12 matching lines...) Expand all Loading... |
155 content::BrowserThread::FILE, | 156 content::BrowserThread::FILE, |
156 FROM_HERE, | 157 FROM_HERE, |
157 base::Bind(&ExternalMetrics::CollectEventsAndReschedule, | 158 base::Bind(&ExternalMetrics::CollectEventsAndReschedule, |
158 weak_factory_.GetWeakPtr()), | 159 weak_factory_.GetWeakPtr()), |
159 base::TimeDelta::FromSeconds(kExternalMetricsCollectionIntervalSeconds)); | 160 base::TimeDelta::FromSeconds(kExternalMetricsCollectionIntervalSeconds)); |
160 DCHECK(result); | 161 DCHECK(result); |
161 } | 162 } |
162 | 163 |
163 } // namespace metrics | 164 } // namespace metrics |
164 } // namespace chromecast | 165 } // namespace chromecast |
OLD | NEW |