Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3255)

Unified Diff: chrome/browser/task_profiler/auto_tracking.h

Issue 9125015: Implement profiler log writing at shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for review comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/task_profiler/auto_tracking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_profiler/auto_tracking.h
diff --git a/chrome/browser/task_profiler/auto_tracking.h b/chrome/browser/task_profiler/auto_tracking.h
new file mode 100644
index 0000000000000000000000000000000000000000..3618f2536c9d7b5cbe590f879dbacd012b3564fc
--- /dev/null
+++ b/chrome/browser/task_profiler/auto_tracking.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_
+#define CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_
+#pragma once
+
+#include "base/file_path.h"
+#include "base/tracked_objects.h"
+
+//------------------------------------------------------------------------------
+// Provide simple way to to start global tracking, and to tear down tracking
+// when done. The design has evolved to *not* do any teardown (and just leak
+// all allocated data structures). This class is currently used to ensure
+// that the profiler data is output during shutdown, if this feature has been
+// requested.
+
+namespace task_profiler {
+
+class AutoTracking {
+ public:
+ AutoTracking() {
+ tracked_objects::ThreadData::Initialize();
+ }
+
+ ~AutoTracking();
+
+ void set_output_file_path(const FilePath &path);
+
+ private:
+ FilePath output_file_path_;
+
+ DISALLOW_COPY_AND_ASSIGN(AutoTracking);
+};
+
+} // namespace task_profiler
+
+#endif // CHROME_BROWSER_TASK_PROFILER_AUTO_TRACKING_H_
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/task_profiler/auto_tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698