Home | History | Annotate | Download | only in profiler
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "base/profiler/scoped_tracker.h"
      6 
      7 #include "base/bind.h"
      8 
      9 namespace tracked_objects {
     10 
     11 namespace {
     12 
     13 ScopedProfile::Mode g_scoped_profile_mode = ScopedProfile::DISABLED;
     14 
     15 }  // namespace
     16 
     17 // static
     18 void ScopedTracker::Enable() {
     19   g_scoped_profile_mode = ScopedProfile::ENABLED;
     20 }
     21 
     22 ScopedTracker::ScopedTracker(const Location& location)
     23     : scoped_profile_(location, g_scoped_profile_mode) {
     24 }
     25 
     26 }  // namespace tracked_objects
     27