| Index: base/metrics/histogram_snapshot_manager.cc
|
| diff --git a/base/metrics/histogram_snapshot_manager.cc b/base/metrics/histogram_snapshot_manager.cc
|
| index a7605aa14179ac6b89a747a201fe0b285eb6dd2d..0d6c7b51561d56d286b2a187302cbba56421e7c0 100644
|
| --- a/base/metrics/histogram_snapshot_manager.cc
|
| +++ b/base/metrics/histogram_snapshot_manager.cc
|
| @@ -42,6 +42,7 @@ void HistogramSnapshotManager::PrepareDelta(const HistogramBase& histogram) {
|
| // Get up-to-date snapshot of sample stats.
|
| scoped_ptr<HistogramSamples> snapshot(histogram.SnapshotSamples());
|
| const std::string& histogram_name = histogram.histogram_name();
|
| + const uint64_t histogram_id = histogram.id();
|
|
|
| int corruption = histogram.FindCorruption(*snapshot);
|
|
|
| @@ -65,23 +66,23 @@ void HistogramSnapshotManager::PrepareDelta(const HistogramBase& histogram) {
|
| histogram_flattener_->InconsistencyDetected(
|
| static_cast<HistogramBase::Inconsistency>(corruption));
|
| // Don't record corrupt data to metrics services.
|
| - int old_corruption = inconsistencies_[histogram_name];
|
| + int old_corruption = inconsistencies_[histogram_id];
|
| if (old_corruption == (corruption | old_corruption))
|
| return; // We've already seen this corruption for this histogram.
|
| - inconsistencies_[histogram_name] |= corruption;
|
| + inconsistencies_[histogram_id] |= corruption;
|
| histogram_flattener_->UniqueInconsistencyDetected(
|
| static_cast<HistogramBase::Inconsistency>(corruption));
|
| return;
|
| }
|
|
|
| HistogramSamples* to_log;
|
| - std::map<std::string, HistogramSamples*>::iterator it =
|
| - logged_samples_.find(histogram_name);
|
| + std::map<uint64_t, HistogramSamples*>::iterator it =
|
| + logged_samples_.find(histogram_id);
|
| if (it == logged_samples_.end()) {
|
| to_log = snapshot.release();
|
|
|
| // This histogram has not been logged before, add a new entry.
|
| - logged_samples_[histogram_name] = to_log;
|
| + logged_samples_[histogram_id] = to_log;
|
| } else {
|
| HistogramSamples* already_logged = it->second;
|
| InspectLoggedSamplesInconsistency(*snapshot, already_logged);
|
|
|