Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / base / metrics / histogram_snapshot_manager.cc
index cb594bd..b1e26da 100644 (file)
@@ -25,18 +25,17 @@ HistogramSnapshotManager::~HistogramSnapshotManager() {
   STLDeleteValues(&logged_samples_);
 }
 
-void HistogramSnapshotManager::PrepareDeltas(HistogramBase::Flags flag_to_set,
-                                             bool record_only_uma) {
+void HistogramSnapshotManager::PrepareDeltas(
+    HistogramBase::Flags flag_to_set,
+    HistogramBase::Flags required_flags) {
   StatisticsRecorder::Histograms histograms;
   StatisticsRecorder::GetHistograms(&histograms);
   for (StatisticsRecorder::Histograms::const_iterator it = histograms.begin();
        histograms.end() != it;
        ++it) {
     (*it)->SetFlags(flag_to_set);
-    if (record_only_uma &&
-        0 == ((*it)->flags() & Histogram::kUmaTargetedHistogramFlag))
-      continue;
-    PrepareDelta(**it);
+    if (((*it)->flags() & required_flags) == required_flags)
+      PrepareDelta(**it);
   }
 }