From a01ec209478a29e0a2b00999443875cd26daca1f Mon Sep 17 00:00:00 2001
From: vadimt <vadimt@chromium.org>
Date: Fri, 6 Mar 2015 08:26:55 -0800
Subject: Removing unused DeathData::ResetMax() method

BUG=456354

Review URL: https://codereview.chromium.org/987593002

Cr-Commit-Position: refs/heads/master@{#319454}
---
 base/tracked_objects.cc | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

(limited to 'base/tracked_objects.cc')

diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index fc29e2e..f7ee6da 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -163,11 +163,6 @@ int32 DeathData::queue_duration_sample() const {
   return queue_duration_sample_;
 }
 
-void DeathData::ResetMax() {
-  run_duration_max_ = 0;
-  queue_duration_max_ = 0;
-}
-
 void DeathData::Clear() {
   count_ = 0;
   run_duration_sum_ = 0;
@@ -399,12 +394,12 @@ void ThreadData::OnThreadTerminationCleanup() {
 }
 
 // static
-void ThreadData::Snapshot(bool reset_max, ProcessDataSnapshot* process_data) {
+void ThreadData::Snapshot(ProcessDataSnapshot* process_data) {
   // Add births that have run to completion to |collected_data|.
   // |birth_counts| tracks the total number of births recorded at each location
   // for which we have not seen a death count.
   BirthCountMap birth_counts;
-  ThreadData::SnapshotAllExecutedTasks(reset_max, process_data, &birth_counts);
+  ThreadData::SnapshotAllExecutedTasks(process_data, &birth_counts);
 
   // Add births that are still active -- i.e. objects that have tallied a birth,
   // but have not yet tallied a matching death, and hence must be either
@@ -587,8 +582,7 @@ void ThreadData::TallyRunInAScopedRegionIfTracking(
 }
 
 // static
-void ThreadData::SnapshotAllExecutedTasks(bool reset_max,
-                                          ProcessDataSnapshot* process_data,
+void ThreadData::SnapshotAllExecutedTasks(ProcessDataSnapshot* process_data,
                                           BirthCountMap* birth_counts) {
   if (!kTrackAllTaskObjects)
     return;  // Not compiled in.
@@ -605,19 +599,18 @@ void ThreadData::SnapshotAllExecutedTasks(bool reset_max,
   for (ThreadData* thread_data = my_list;
        thread_data;
        thread_data = thread_data->next()) {
-    thread_data->SnapshotExecutedTasks(reset_max, process_data, birth_counts);
+    thread_data->SnapshotExecutedTasks(process_data, birth_counts);
   }
 }
 
-void ThreadData::SnapshotExecutedTasks(bool reset_max,
-                                       ProcessDataSnapshot* process_data,
+void ThreadData::SnapshotExecutedTasks(ProcessDataSnapshot* process_data,
                                        BirthCountMap* birth_counts) {
   // Get copy of data, so that the data will not change during the iterations
   // and processing.
   ThreadData::BirthMap birth_map;
   ThreadData::DeathMap death_map;
   ThreadData::ParentChildSet parent_child_set;
-  SnapshotMaps(reset_max, &birth_map, &death_map, &parent_child_set);
+  SnapshotMaps(&birth_map, &death_map, &parent_child_set);
 
   for (ThreadData::DeathMap::const_iterator it = death_map.begin();
        it != death_map.end(); ++it) {
@@ -641,8 +634,7 @@ void ThreadData::SnapshotExecutedTasks(bool reset_max,
 }
 
 // This may be called from another thread.
-void ThreadData::SnapshotMaps(bool reset_max,
-                              BirthMap* birth_map,
+void ThreadData::SnapshotMaps(BirthMap* birth_map,
                               DeathMap* death_map,
                               ParentChildSet* parent_child_set) {
   base::AutoLock lock(map_lock_);
@@ -652,8 +644,6 @@ void ThreadData::SnapshotMaps(bool reset_max,
   for (DeathMap::iterator it = death_map_.begin();
        it != death_map_.end(); ++it) {
     (*death_map)[it->first] = it->second;
-    if (reset_max)
-      it->second.ResetMax();
   }
 
   if (!kTrackParentChildLinks)
-- 
cgit v1.1