Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / task_profiler / auto_tracking.h
blob5c88fad33884cd7c7d9c1e66b8d53a94368b25c5
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
16 // requested.
18 namespace task_profiler {
20 class AutoTracking {
21 public:
22 AutoTracking() {
23 tracked_objects::ThreadData::Initialize();
26 ~AutoTracking();
28 void set_output_file_path(const base::FilePath &path);
30 private:
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_