OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/tracing/trace_message_filter.h" | 5 #include "content/browser/tracing/trace_message_filter.h" |
6 | 6 |
7 #include "components/tracing/tracing_messages.h" | 7 #include "components/tracing/tracing_messages.h" |
8 #include "content/browser/tracing/tracing_controller_impl.h" | 8 #include "content/browser/tracing/tracing_controller_impl.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 TraceMessageFilter::TraceMessageFilter() | 12 TraceMessageFilter::TraceMessageFilter() : |
13 : BrowserMessageFilter(TracingMsgStart), | 13 has_child_(false), |
14 has_child_(false), | 14 is_awaiting_end_ack_(false), |
15 is_awaiting_end_ack_(false), | 15 is_awaiting_capture_monitoring_snapshot_ack_(false), |
16 is_awaiting_capture_monitoring_snapshot_ack_(false), | 16 is_awaiting_buffer_percent_full_ack_(false) { |
17 is_awaiting_buffer_percent_full_ack_(false) { | |
18 } | 17 } |
19 | 18 |
20 TraceMessageFilter::~TraceMessageFilter() {} | 19 TraceMessageFilter::~TraceMessageFilter() {} |
21 | 20 |
22 void TraceMessageFilter::OnChannelClosing() { | 21 void TraceMessageFilter::OnChannelClosing() { |
23 if (has_child_) { | 22 if (has_child_) { |
24 if (is_awaiting_end_ack_) | 23 if (is_awaiting_end_ack_) |
25 OnEndTracingAck(std::vector<std::string>()); | 24 OnEndTracingAck(std::vector<std::string>()); |
26 | 25 |
27 if (is_awaiting_capture_monitoring_snapshot_ack_) | 26 if (is_awaiting_capture_monitoring_snapshot_ack_) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 if (is_awaiting_buffer_percent_full_ack_) { | 161 if (is_awaiting_buffer_percent_full_ack_) { |
163 is_awaiting_buffer_percent_full_ack_ = false; | 162 is_awaiting_buffer_percent_full_ack_ = false; |
164 TracingControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( | 163 TracingControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( |
165 this, percent_full); | 164 this, percent_full); |
166 } else { | 165 } else { |
167 NOTREACHED(); | 166 NOTREACHED(); |
168 } | 167 } |
169 } | 168 } |
170 | 169 |
171 } // namespace content | 170 } // namespace content |
OLD | NEW |