Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2935)

Unified Diff: base/metrics/statistics_recorder.cc

Issue 1776973002: Revert of Collect information about failing histogram factory calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/metrics_hashes.cc ('k') | chrome/browser/extensions/api/metrics_private/metrics_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/statistics_recorder.cc
diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc
index 90d64bb9ea3c6bf3a1b351f3d494d9c534dc7d48..d0fa2add3603b3f574dfa9ef9e5ee2e6b152aafc 100644
--- a/base/metrics/statistics_recorder.cc
+++ b/base/metrics/statistics_recorder.cc
@@ -5,7 +5,6 @@
#include "base/metrics/statistics_recorder.h"
#include "base/at_exit.h"
-#include "base/debug/alias.h"
#include "base/debug/leak_annotations.h"
#include "base/json/string_escape.h"
#include "base/logging.h"
@@ -124,17 +123,13 @@
histogram_to_return = histogram;
} else {
// We already have one histogram with this name.
- CHECK_EQ(histogram->histogram_name(),
- it->second->histogram_name()) << "hash collision";
+ DCHECK_EQ(histogram->histogram_name(),
+ it->second->histogram_name()) << "hash collision";
histogram_to_return = it->second;
histogram_to_delete = histogram;
}
- base::debug::Alias(&it);
- base::debug::Alias(&name);
- base::debug::Alias(&name_hash);
}
}
- base::debug::Alias(&histogram);
delete histogram_to_delete;
return histogram_to_return;
}
@@ -284,22 +279,10 @@
if (histograms_ == NULL)
return NULL;
- const uint64_t lookup_hash = HashMetricName(name);
- HistogramMap::iterator it = histograms_->find(lookup_hash);
+ HistogramMap::iterator it = histograms_->find(HashMetricName(name));
if (histograms_->end() == it)
return NULL;
-
- const uint64_t existing_hash = it->first;
- const char* existing_name = it->second->histogram_name().c_str();
- HistogramMap* histograms = histograms_;
- CHECK_EQ(name, it->second->histogram_name()) << "hash collision";
- base::debug::Alias(&lookup_hash);
- base::debug::Alias(&existing_hash);
- base::debug::Alias(&name);
- base::debug::Alias(&existing_name);
- base::debug::Alias(&it);
- base::debug::Alias(&histograms);
-
+ DCHECK_EQ(name, it->second->histogram_name()) << "hash collision";
return it->second;
}
« no previous file with comments | « base/metrics/metrics_hashes.cc ('k') | chrome/browser/extensions/api/metrics_private/metrics_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698