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

Unified Diff: base/test/trace_to_file.h

Issue 542893002: Add trace-to-file support for base::TestSuite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded include Created 6 years, 3 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: base/test/trace_to_file.h
diff --git a/base/test/trace_to_file.h b/base/test/trace_to_file.h
new file mode 100644
index 0000000000000000000000000000000000000000..43087367c3086a245ab507d213f831b771fe0fbd
--- /dev/null
+++ b/base/test/trace_to_file.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2014 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 BASE_TEST_TRACE_TO_FILE_H_
+#define BASE_TEST_TRACE_TO_FILE_H_
+
+#include "base/files/file_path.h"
+
+namespace base {
+namespace test {
+
+class TraceToFile {
+ public:
+ TraceToFile();
+ ~TraceToFile();
+
+ void BeginTracingFromCommandLineOptions();
+ void BeginTracing(const base::FilePath& path, const std::string& categories);
+ void EndTracingIfNeeded();
+
+ private:
+ void WriteFileHeader();
+ void AppendFileFooter();
+
+ void TraceOutputCallback(const std::string& data);
+
+ base::FilePath path_;
+ bool started_;
+};
+
+} // namespace test
+} // namespace base
+
+#endif // BASE_TEST_TRACE_TO_FILE_H_
« no previous file with comments | « base/test/test_suite.cc ('k') | base/test/trace_to_file.cc » ('j') | base/test/trace_to_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698