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

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

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
Index: chrome/browser/task_profiler/auto_tracking.cc
diff --git a/chrome/browser/task_profiler/auto_tracking.cc b/chrome/browser/task_profiler/auto_tracking.cc
new file mode 100644
index 0000000000000000000000000000000000000000..425077c5b4976ab78c0de44af59e4424e11e9b6f
--- /dev/null
+++ b/chrome/browser/task_profiler/auto_tracking.cc
@@ -0,0 +1,21 @@
+// 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 "chrome/browser/task_profiler/auto_tracking.h"
+#include "chrome/browser/task_profiler/task_profiler_data_serializer.h"
+
+namespace task_profiler {
+
+AutoTracking::~AutoTracking() {
+ if (!output_file_path_.empty()) {
+ TaskProfilerDataSerializer output;
+ output.WriteToFile(output_file_path_);
+ }
+}
+
+void AutoTracking::set_output_file_path(const FilePath &path) {
+ output_file_path_ = path;
+}
+
+} // namespace task_profiler
« no previous file with comments | « chrome/browser/task_profiler/auto_tracking.h ('k') | chrome/browser/task_profiler/task_profiler_data_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698