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

Side by Side Diff: content/browser/tracing/trace_message_filter.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
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
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
OLDNEW
« no previous file with comments | « content/browser/speech/speech_recognition_dispatcher_host.cc ('k') | content/browser/vibration/vibration_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698