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 "components/metrics/histogram_encoder.h" | 5 #include "components/metrics/histogram_encoder.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | |
10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
11 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
12 #include "base/metrics/histogram_samples.h" | 11 #include "base/metrics/histogram_samples.h" |
13 #include "base/metrics/metrics_hashes.h" | 12 #include "base/metrics/metrics_hashes.h" |
14 | 13 |
15 using base::SampleCountIterator; | 14 using base::SampleCountIterator; |
16 | 15 |
17 namespace metrics { | 16 namespace metrics { |
18 | 17 |
19 void EncodeHistogramDelta(const std::string& histogram_name, | 18 void EncodeHistogramDelta(const std::string& histogram_name, |
(...skipping 26 matching lines...) Expand all Loading... |
46 if (i + 1 < histogram_proto->bucket_size() && | 45 if (i + 1 < histogram_proto->bucket_size() && |
47 bucket->max() == histogram_proto->bucket(i + 1).min()) { | 46 bucket->max() == histogram_proto->bucket(i + 1).min()) { |
48 bucket->clear_max(); | 47 bucket->clear_max(); |
49 } else if (bucket->max() == bucket->min() + 1) { | 48 } else if (bucket->max() == bucket->min() + 1) { |
50 bucket->clear_min(); | 49 bucket->clear_min(); |
51 } | 50 } |
52 } | 51 } |
53 } | 52 } |
54 | 53 |
55 } // namespace metrics | 54 } // namespace metrics |
OLD | NEW |