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

Side by Side Diff: shell/tracer.h

Issue 1334213002: Support for tracing app initialization. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « shell/context.cc ('k') | shell/tracer.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SHELL_TRACER_H_ 5 #ifndef SHELL_TRACER_H_
6 #define SHELL_TRACER_H_ 6 #define SHELL_TRACER_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // Emits a comma if needed. 74 // Emits a comma if needed.
75 void WriteCommaIfNeeded(); 75 void WriteCommaIfNeeded();
76 76
77 // Writes trace file footer and closes out the file. 77 // Writes trace file footer and closes out the file.
78 void WriteFooterAndClose(); 78 void WriteFooterAndClose();
79 79
80 // Set when connected to the tracing service. 80 // Set when connected to the tracing service.
81 tracing::TraceCollectorPtr coordinator_; 81 tracing::TraceCollectorPtr coordinator_;
82 scoped_ptr<mojo::common::DataPipeDrainer> drainer_; 82 scoped_ptr<mojo::common::DataPipeDrainer> drainer_;
83 83
84 mojo::TraceProviderImpl trace_provider_impl_;
84 // Whether we're currently tracing. 85 // Whether we're currently tracing.
85 bool tracing_; 86 bool tracing_;
86 // How long to trace after message loop creation. 87 // How long to trace after message loop creation.
87 int trace_duration_secs_; 88 int trace_duration_secs_;
88 // Categories to trace. 89 // Categories to trace.
89 std::string categories_; 90 std::string categories_;
90 91
91 // Whether we've written the first chunk. 92 // Whether we've written the first chunk.
92 bool first_chunk_written_; 93 bool first_chunk_written_;
93 std::string trace_service_data_; 94 std::string trace_service_data_;
94 95
95 // Trace file, if open. 96 // Trace file, if open.
96 FILE* trace_file_; 97 FILE* trace_file_;
97 std::string trace_filename_; 98 std::string trace_filename_;
98 99
99 DISALLOW_COPY_AND_ASSIGN(Tracer); 100 DISALLOW_COPY_AND_ASSIGN(Tracer);
100 }; 101 };
101 102
102 } // namespace shell 103 } // namespace shell
103 104
104 #endif // SHELL_TRACER_H_ 105 #endif // SHELL_TRACER_H_
OLDNEW
« no previous file with comments | « shell/context.cc ('k') | shell/tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698