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

Side by Side Diff: base/debug/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: CHECK -> DCHECK 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 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.
4
5 #ifndef BASE_DEBUG_TRACE_TO_FILE_H_
6 #define BASE_DEBUG_TRACE_TO_FILE_H_
7
8 #include "base/files/file_path.h"
9
10 namespace base {
11 namespace debug {
12
13 class TraceToFile {
14 public:
15 TraceToFile();
16 ~TraceToFile();
17
18 void BeginTracingFromCommandLineOptions();
19 void BeginTracing(const base::FilePath& path, const std::string& categories);
20
21 // Assumes current message loop is not being pumped and is idle.
22 // This is a valid assumption for unit tests, but not for the browser.
23 void EndTracingIfNeeded();
24
25 private:
26 void WriteFileHeader();
27 void AppendFileFooter();
28
29 void TraceOutputCallback(const std::string& data);
30
31 base::FilePath path_;
32 bool started_;
33 };
34
35 } // namespace debug
36 } // namespace base
37
38 #endif // BASE_DEBUG_TRACE_TO_FILE_H_
OLDNEW
« no previous file with comments | « base/base_switches.cc ('k') | base/debug/trace_to_file.cc » ('j') | base/debug/trace_to_file.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698