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

Side by Side Diff: tools/gn/trace.h

Issue 196413016: Move CommandLine to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/setup.h ('k') | ui/gfx/gtk_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_TRACE_H_ 5 #ifndef TOOLS_GN_TRACE_H_
6 #define TOOLS_GN_TRACE_H_ 6 #define TOOLS_GN_TRACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::string cmdline_; 63 std::string cmdline_;
64 }; 64 };
65 65
66 class ScopedTrace { 66 class ScopedTrace {
67 public: 67 public:
68 ScopedTrace(TraceItem::Type t, const std::string& name); 68 ScopedTrace(TraceItem::Type t, const std::string& name);
69 ScopedTrace(TraceItem::Type t, const Label& label); 69 ScopedTrace(TraceItem::Type t, const Label& label);
70 ~ScopedTrace(); 70 ~ScopedTrace();
71 71
72 void SetToolchain(const Label& label); 72 void SetToolchain(const Label& label);
73 void SetCommandLine(const CommandLine& cmdline); 73 void SetCommandLine(const base::CommandLine& cmdline);
74 74
75 void Done(); 75 void Done();
76 76
77 private: 77 private:
78 TraceItem* item_; 78 TraceItem* item_;
79 bool done_; 79 bool done_;
80 }; 80 };
81 81
82 // Call to turn tracing on. It's off by default. 82 // Call to turn tracing on. It's off by default.
83 void EnableTracing(); 83 void EnableTracing();
84 84
85 // Adds a trace event to the log. Takes ownership of the pointer. 85 // Adds a trace event to the log. Takes ownership of the pointer.
86 void AddTrace(TraceItem* item); 86 void AddTrace(TraceItem* item);
87 87
88 // Returns a summary of the current traces, or the empty string if tracing is 88 // Returns a summary of the current traces, or the empty string if tracing is
89 // not enabled. 89 // not enabled.
90 std::string SummarizeTraces(); 90 std::string SummarizeTraces();
91 91
92 // Saves the current traces to the given filename in JSON format. 92 // Saves the current traces to the given filename in JSON format.
93 void SaveTraces(const base::FilePath& file_name); 93 void SaveTraces(const base::FilePath& file_name);
94 94
95 #endif // TOOLS_GN_TRACE_H_ 95 #endif // TOOLS_GN_TRACE_H_
OLDNEW
« no previous file with comments | « tools/gn/setup.h ('k') | ui/gfx/gtk_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698