OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/trace_message_filter.h" | 5 #include "content/browser/trace_message_filter.h" |
6 | 6 |
7 #include "content/browser/trace_controller.h" | 7 #include "content/browser/trace_controller.h" |
8 #include "content/common/child_process_messages.h" | 8 #include "content/common/child_process_messages.h" |
9 | 9 |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void TraceMessageFilter::OnEndTracingAck() { | 75 void TraceMessageFilter::OnEndTracingAck() { |
76 // is_awaiting_end_ack_ should always be true here, but check in case the | 76 // is_awaiting_end_ack_ should always be true here, but check in case the |
77 // child process is compromised. | 77 // child process is compromised. |
78 if (is_awaiting_end_ack_) { | 78 if (is_awaiting_end_ack_) { |
79 is_awaiting_end_ack_ = false; | 79 is_awaiting_end_ack_ = false; |
80 TraceController::GetInstance()->OnEndTracingAck(); | 80 TraceController::GetInstance()->OnEndTracingAck(); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) { | 84 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) { |
85 TraceController::GetInstance()->OnTraceDataCollected( | 85 TraceController::GetInstance()->OnTraceDataCollected(data); |
86 make_scoped_refptr(new base::debug::TraceLog::RefCountedString(data))); | |
87 } | 86 } |
88 | 87 |
89 void TraceMessageFilter::OnTraceBufferFull() { | 88 void TraceMessageFilter::OnTraceBufferFull() { |
90 TraceController::GetInstance()->OnTraceBufferFull(); | 89 TraceController::GetInstance()->OnTraceBufferFull(); |
91 } | 90 } |
92 | 91 |
93 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) { | 92 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) { |
94 if (is_awaiting_bpf_ack_) { | 93 if (is_awaiting_bpf_ack_) { |
95 is_awaiting_bpf_ack_ = false; | 94 is_awaiting_bpf_ack_ = false; |
96 TraceController::GetInstance()->OnTraceBufferPercentFullReply( | 95 TraceController::GetInstance()->OnTraceBufferPercentFullReply( |
97 percent_full); | 96 percent_full); |
98 } | 97 } |
99 } | 98 } |
100 | 99 |
OLD | NEW |