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

Unified Diff: chrome/common/metrics/metrics_log_base.cc

Issue 11682003: Serialize/Deserialize support in HistogramBase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
Index: chrome/common/metrics/metrics_log_base.cc
diff --git a/chrome/common/metrics/metrics_log_base.cc b/chrome/common/metrics/metrics_log_base.cc
index 938828fc306b6e76ee6ea53c879a2e2d859ad901..c5d6950a41ff0c5fccd4c6582d2d79943c26755d 100644
--- a/chrome/common/metrics/metrics_log_base.cc
+++ b/chrome/common/metrics/metrics_log_base.cc
@@ -452,9 +452,8 @@ void MetricsLogBase::EndElement() {
// Internal state is being needlessly exposed, and it would be hard to reuse
// this code. If we moved this into the Histogram class, then we could use
// the same infrastructure for logging StatsCounters, RatesCounters, etc.
-void MetricsLogBase::RecordHistogramDelta(
- const Histogram& histogram,
- const HistogramSamples& snapshot) {
+void MetricsLogBase::RecordHistogramDelta(const std::string& histogram_name,
+ const HistogramSamples& snapshot) {
DCHECK(!locked_);
DCHECK_NE(0, snapshot.TotalCount());
@@ -464,9 +463,7 @@ void MetricsLogBase::RecordHistogramDelta(
std::string base64_name_hash;
uint64 numeric_name_hash;
- CreateHashes(histogram.histogram_name(),
- &base64_name_hash,
- &numeric_name_hash);
+ CreateHashes(histogram_name, &base64_name_hash, &numeric_name_hash);
// Write the XML version.
WriteAttribute("name", base64_name_hash);

Powered by Google App Engine
This is Rietveld 408576698