| OLD | NEW |
| 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 #include "base/metrics/histogram_samples.h" | 5 #include "base/metrics/histogram_samples.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 return false; | 106 return false; |
| 107 } | 107 } |
| 108 return true; | 108 return true; |
| 109 } | 109 } |
| 110 | 110 |
| 111 void HistogramSamples::IncreaseSum(int64 diff) { | 111 void HistogramSamples::IncreaseSum(int64 diff) { |
| 112 sum_ += diff; | 112 sum_ += diff; |
| 113 } | 113 } |
| 114 | 114 |
| 115 void HistogramSamples::IncreaseRedundantCount(HistogramBase::Count diff) { | 115 void HistogramSamples::IncreaseRedundantCount(HistogramBase::Count diff) { |
| 116 redundant_count_ += diff; | 116 base::subtle::NoBarrier_Store(&redundant_count_, |
| 117 base::subtle::NoBarrier_Load(&redundant_count_) + diff); |
| 117 } | 118 } |
| 118 | 119 |
| 119 SampleCountIterator::~SampleCountIterator() {} | 120 SampleCountIterator::~SampleCountIterator() {} |
| 120 | 121 |
| 121 bool SampleCountIterator::GetBucketIndex(size_t* index) const { | 122 bool SampleCountIterator::GetBucketIndex(size_t* index) const { |
| 122 DCHECK(!Done()); | 123 DCHECK(!Done()); |
| 123 return false; | 124 return false; |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace base | 127 } // namespace base |
| OLD | NEW |