diff options
Diffstat (limited to 'base/profiler/scoped_profile.cc')
-rw-r--r-- | base/profiler/scoped_profile.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/base/profiler/scoped_profile.cc b/base/profiler/scoped_profile.cc deleted file mode 100644 index 7bd31fe..0000000 --- a/base/profiler/scoped_profile.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/profiler/scoped_profile.h" - -#include "base/location.h" -#include "base/tracked_objects.h" - - -namespace tracked_objects { - - -ScopedProfile::ScopedProfile(const Location& location) - : birth_(ThreadData::TallyABirthIfActive(location)), - start_of_run_(ThreadData::Now()) { -} - -ScopedProfile::~ScopedProfile() { - StopClockAndTally(); -} - -void ScopedProfile::StopClockAndTally() { - if (!birth_) - return; - ThreadData::TallyRunInAScopedRegionIfTracking(birth_, start_of_run_, - ThreadData::Now()); - birth_ = NULL; -} - -} // namespace tracked_objects |