Commit 8329d678 authored by François Degros's avatar François Degros Committed by Commit Bot

Moved HistogramSnapshotManager::PrepareDeltas definition to .cc file.

This method used to be a template. But since it's not anymore, it doesn't need
to be defined in the header file anymore.

Change-Id: I5e3b769ff4e7fced01524ddb39bf163b8e82f66f
Reviewed-on: https://chromium-review.googlesource.com/892184
Commit-Queue: François Degros <fdegros@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533094}
parent 744af7bf
...@@ -43,6 +43,17 @@ HistogramSnapshotManager::HistogramSnapshotManager( ...@@ -43,6 +43,17 @@ HistogramSnapshotManager::HistogramSnapshotManager(
HistogramSnapshotManager::~HistogramSnapshotManager() = default; HistogramSnapshotManager::~HistogramSnapshotManager() = default;
void HistogramSnapshotManager::PrepareDeltas(
const std::vector<HistogramBase*>& histograms,
HistogramBase::Flags flags_to_set,
HistogramBase::Flags required_flags) {
for (HistogramBase* const histogram : histograms) {
histogram->SetFlags(flags_to_set);
if ((histogram->flags() & required_flags) == required_flags)
PrepareDelta(histogram);
}
}
void HistogramSnapshotManager::PrepareDelta(HistogramBase* histogram) { void HistogramSnapshotManager::PrepareDelta(HistogramBase* histogram) {
if (!histogram->ValidateHistogramContents(true, 0)) if (!histogram->ValidateHistogramContents(true, 0))
return; return;
......
...@@ -41,13 +41,7 @@ class BASE_EXPORT HistogramSnapshotManager final { ...@@ -41,13 +41,7 @@ class BASE_EXPORT HistogramSnapshotManager final {
// |Histogram::kNoFlags|. // |Histogram::kNoFlags|.
void PrepareDeltas(const std::vector<HistogramBase*>& histograms, void PrepareDeltas(const std::vector<HistogramBase*>& histograms,
HistogramBase::Flags flags_to_set, HistogramBase::Flags flags_to_set,
HistogramBase::Flags required_flags) { HistogramBase::Flags required_flags);
for (HistogramBase* const histogram : histograms) {
histogram->SetFlags(flags_to_set);
if ((histogram->flags() & required_flags) == required_flags)
PrepareDelta(histogram);
}
}
// When the collection is not so simple as can be done using a single // When the collection is not so simple as can be done using a single
// iterator, the steps can be performed separately. Call PerpareDelta() // iterator, the steps can be performed separately. Call PerpareDelta()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment