summaryrefslogtreecommitdiffstats
path: root/base/histogram.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/histogram.cc')
-rw-r--r--base/histogram.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/base/histogram.cc b/base/histogram.cc
index 03478d7..c7a64af 100644
--- a/base/histogram.cc
+++ b/base/histogram.cc
@@ -392,7 +392,7 @@ std::string Histogram::SerializeHistogramInfo(const Histogram& histogram,
pickle.WriteInt(histogram.declared_max());
pickle.WriteSize(histogram.bucket_count());
pickle.WriteInt(histogram.histogram_type());
- pickle.WriteInt(histogram.flags() & ~kIPCSerializationSourceFlag);
+ pickle.WriteInt(histogram.flags());
snapshot.Serialize(&pickle);
return std::string(static_cast<const char*>(pickle.data()), pickle.size());
@@ -425,6 +425,7 @@ bool Histogram::DeserializeHistogramInfo(const std::string& histogram_info) {
LOG(ERROR) << "Pickle error decoding Histogram: " << histogram_name;
return false;
}
+ DCHECK(pickle_flags & kIPCSerializationSourceFlag);
// Since these fields may have come from an untrusted renderer, do additional
// checks above and beyond those in Histogram::Initialize()
if (declared_max <= 0 || declared_min <= 0 || declared_max < declared_min ||
@@ -798,21 +799,6 @@ void StatisticsRecorder::GetHistograms(Histograms* output) {
}
}
-// static
-void StatisticsRecorder::GetHistogramsForRenderer(Histograms* output) {
- if (!histograms_)
- return;
- AutoLock auto_lock(*lock_);
- for (HistogramMap::iterator it = histograms_->begin();
- histograms_->end() != it;
- ++it) {
- scoped_refptr<Histogram> histogram = it->second;
- if (!(histogram->flags() & Histogram::kIPCSerializationSourceFlag))
- histogram->SetFlags(Histogram::kIPCSerializationSourceFlag);
- output->push_back(histogram);
- }
-}
-
bool StatisticsRecorder::FindHistogram(const std::string& name,
scoped_refptr<Histogram>* histogram) {
if (!histograms_)