1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_
6 #define CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_
8 #include "base/files/file_path.h"
9 #include "base/tracked_objects.h"
11 //------------------------------------------------------------------------------
12 // Provide simple way to to start global tracking, and to tear down tracking
13 // when done. The design has evolved to *not* do any teardown (and just leak
14 // all allocated data structures). This class is currently used to ensure
15 // that the profiler data is output during shutdown, if this feature has been
18 namespace task_profiler
{
23 tracked_objects::ThreadData::Initialize();
28 void set_output_file_path(const base::FilePath
&path
);
31 base::FilePath output_file_path_
;
33 DISALLOW_COPY_AND_ASSIGN(AutoTracking
);
36 } // namespace task_profiler
38 #endif // CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_