summaryrefslogtreecommitdiffstats
path: root/base/metrics/statistics_recorder.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 08:20:20 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 08:20:20 +0000
commit75eda33a79ab30dc52c975dd3f4950585f5c3012 (patch)
tree29379da8e936648d6f9fd8236b596f152878f2ac /base/metrics/statistics_recorder.cc
parent214ba2d9264bea909215b4ce1a793d9df683b6aa (diff)
downloadchromium_src-75eda33a79ab30dc52c975dd3f4950585f5c3012.zip
chromium_src-75eda33a79ab30dc52c975dd3f4950585f5c3012.tar.gz
chromium_src-75eda33a79ab30dc52c975dd3f4950585f5c3012.tar.bz2
Revert 148055 - Move CachedRanges out and add support for checksum.
This breaks the NaCL compiler, as the addition the base.gypi results in a too long command line. For the sake of getting the tree green, I'm reverting this, although the NaCL compiler is really to blame Review URL: https://chromiumcodereview.appspot.com/10796047 TBR=kaiwang@chromium.org Review URL: https://chromiumcodereview.appspot.com/10807083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/metrics/statistics_recorder.cc')
-rw-r--r--base/metrics/statistics_recorder.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc
index 874cdb8..646acc1 100644
--- a/base/metrics/statistics_recorder.cc
+++ b/base/metrics/statistics_recorder.cc
@@ -121,32 +121,32 @@ Histogram* StatisticsRecorder::RegisterOrDeleteDuplicate(Histogram* histogram) {
// static
void StatisticsRecorder::RegisterOrDeleteDuplicateRanges(Histogram* histogram) {
DCHECK(histogram);
- BucketRanges* histogram_ranges = histogram->bucket_ranges();
+ CachedRanges* histogram_ranges = histogram->cached_ranges();
DCHECK(histogram_ranges);
uint32 checksum = histogram->range_checksum();
- histogram_ranges->set_checksum(checksum);
+ histogram_ranges->SetRangeChecksum(checksum);
RangesMap::iterator ranges_it = ranges_->find(checksum);
if (ranges_->end() == ranges_it) {
- // Register the new BucketRanges.
- std::list<BucketRanges*>* checksum_matching_list(
- new std::list<BucketRanges*>());
+ // Register the new CachedRanges.
+ std::list<CachedRanges*>* checksum_matching_list(
+ new std::list<CachedRanges*>());
checksum_matching_list->push_front(histogram_ranges);
(*ranges_)[checksum] = checksum_matching_list;
return;
}
- // Use the registered BucketRanges if the registered BucketRanges has same
- // ranges_ as |histogram|'s BucketRanges.
- std::list<BucketRanges*>* checksum_matching_list = ranges_it->second;
- std::list<BucketRanges*>::iterator checksum_matching_list_it;
+ // Use the registered CachedRanges if the registered CachedRanges has same
+ // ranges_ as |histogram|'s CachedRanges.
+ std::list<CachedRanges*>* checksum_matching_list = ranges_it->second;
+ std::list<CachedRanges*>::iterator checksum_matching_list_it;
for (checksum_matching_list_it = checksum_matching_list->begin();
checksum_matching_list_it != checksum_matching_list->end();
++checksum_matching_list_it) {
- BucketRanges* existing_histogram_ranges = *checksum_matching_list_it;
+ CachedRanges* existing_histogram_ranges = *checksum_matching_list_it;
DCHECK(existing_histogram_ranges);
if (existing_histogram_ranges->Equals(histogram_ranges)) {
- histogram->set_bucket_ranges(existing_histogram_ranges);
+ histogram->set_cached_ranges(existing_histogram_ranges);
++number_of_vectors_saved_;
saved_ranges_size_ += histogram_ranges->size();
delete histogram_ranges;
@@ -154,8 +154,8 @@ void StatisticsRecorder::RegisterOrDeleteDuplicateRanges(Histogram* histogram) {
}
}
- // We haven't found a BucketRanges which has the same ranges. Register the
- // new BucketRanges.
+ // We haven't found a CachedRanges which has the same ranges. Register the
+ // new CachedRanges.
DCHECK(checksum_matching_list_it == checksum_matching_list->end());
checksum_matching_list->push_front(histogram_ranges);
}